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 loewis
Recipients loewis, ocean-city
Date 2008-09-09.21:21:37
SpamBayes Score 8.606926e-09
Marked as misclassified No
Message-id <1220995298.21.0.806512250901.issue3824@psf.upfronthosting.co.za>
In-reply-to
Content
I think you should use the locale's encoding to process the data, ie.
either mbstowcs, then Unicode from wchar_t, or decode with the
nl_langinfo(CODESET) encoding. You might have to set the locale before
this can work (which isn't thread-safe), so it might be tricky to implement.

Python already does nl_langinfo at startup, but then restores the
locale. It should probably save the default locale's codeset somewhere,
as C code requires it in many places.

There is also a "system" encoding, but that is UTF-8 independent of the
system.
History
Date User Action Args
2008-09-09 21:21:38loewissetrecipients: + loewis, ocean-city
2008-09-09 21:21:38loewissetmessageid: <1220995298.21.0.806512250901.issue3824@psf.upfronthosting.co.za>
2008-09-09 21:21:37loewislinkissue3824 messages
2008-09-09 21:21:37loewiscreate