retitle 326987 problems with file names specified as Unicode objects and 
containing non-ASCII chars
tags 326987 pending
thanks

Hi,

Thanks for your good report. I am finalizing a new upstream release that
fixes the problem and will soon upload to the Debian archive.

FYI, I used this instead of your fix, because yours only works in an
UTF-8 locale, where file names are stored in UTF-8:

            /* Is it an Unicode object? */
            if (PyUnicode_Check(item))
                {
                    /* Yes -> encode it to a regular string */
                    if ((py_str = PyUnicode_AsEncodedString(
                             item, Py_FileSystemDefaultEncoding,
                             "strict")) == NULL)
                        goto error;
                    
                    Py_DECREF(item); /* We don't need the Unicode object
                                      * anymore. */
                    item = py_str; /* item becomes a simple string */
                }
            
            if ((py_internal_str = PyString_AsString(item)) == NULL)
                goto error;


-- 
Florent


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to