[Catalog-sig] Replacement client for pep381client

Christian Theune ct at gocept.com
Mon Mar 25 18:45:26 CET 2013


Hi,

On Mar 22, 2013, at 5:44 AM, Andreas Jung <lists at zopyx.com> wrote:

> 
> I don't know much about filesystem encodings but if a FS encoding like
> 
>>>> sys.getfilesystemencoding()
> 'ANSI_X3.4-1968'
> 
> is a system-wide setting then it is unlikely that you make an encoding
> change a mandatory requirement. 'ANSI_X3.4-1968' is at least returned
> on my CentOS and Ubuntu box.

Reading up on the VFS unicode handling it appears that we just need to treat everything as bytestrings and encode it ourselves. The locale setting is really just an environment variable influencing library behaviour (like glib) - the kernel doesn't seem to care except for '/' and '\0'.

However, you may also need to make sure that your web server treats the unicode URLs correctly and uses UTF-8 as the encoding for looking up the filenames.

I have applied a fix forcing the filenames to always be encoded as UTF-8.

Christian

-- 
Christian Theune · ct at gocept.com
gocept gmbh & co. kg · Forsterstraße 29 · 06112 Halle (Saale) · Germany
http://gocept.com · Tel +49 345 1229889-7
Python, Pyramid, Plone, Zope · consulting, development, hosting, operations

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4334 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/catalog-sig/attachments/20130325/8779052f/attachment.bin>


More information about the Catalog-SIG mailing list