This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author christian.heimes
Recipients alexandre.vassalotti, christian.heimes, gvanrossum
Date 2007-10-14.16:22:53
SpamBayes Score 0.0006757813
Marked as misclassified No
Message-id <47124259.6080805@cheimes.de>
In-reply-to <1192378659.86.0.20481632454.issue1272@psf.upfronthosting.co.za>
Content
Alexandre Vassalotti wrote:
> Alexandre Vassalotti added the comment:
> 
> I thought of another way to implement PyUnicode_DecodeFSDefault. If
> Py_FileSystemDefaultEncoding is set, decode with the codecs module,
> otherwise use UTF-8 + replace. This works because when
> Py_FileSystemDefaultEncoding is initialized at the end of
> Py_InitializeEx(), the codecs module is ready to be used. Here's what
> it looks like:

That's almost what I had in mind but with two exceptions for __APPLE__
and MS_WINDOWS. For both OS the value of Py_FileSystemDefaultEncoding is
hard coded to UTF-8 / MBCS. In your code the method would use
PyUnicode_Decode() too early but you can work around the problem with
two #if defined.

Christian
History
Date User Action Args
2007-10-14 16:22:54christian.heimessetspambayes_score: 0.000675781 -> 0.0006757813
recipients: + christian.heimes, gvanrossum, alexandre.vassalotti
2007-10-14 16:22:53christian.heimeslinkissue1272 messages
2007-10-14 16:22:53christian.heimescreate