A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2008-December/084055.html below:

[Python-Dev] Python-3.0, unicode, and os.environ

[Python-Dev] Python-3.0, unicode, and os.environAdam Olsen rhamph at gmail.com
Sun Dec 7 05:53:07 CET 2008
On Sat, Dec 6, 2008 at 6:51 PM, Nick Coghlan <ncoghlan at gmail.com> wrote:
> André Malo wrote:
>>> While on Windows:
>>> - underlying OS API uses Unicode
>>> - Unicode API just passes values straight through
>>> - binary API uses the system encoding to decode bytes names and values
>>> to be passed to the OS API and to encode Unicode names and values
>>> received from the OS API
>>
>> Now that is somewhat strange. That way you'll have two unreliable APIs and
>> need to switch depending on the platform again.
>
> Sory, system encoding was probably a poor choice of words there, since
> that generally means mbcs when talking about windows (which would indeed
> be a very poor choice of encoding).
>
> For binary wrappers around the Windows Unicode APIs, I was thinking
> specifically of using UTF-8, since that should be able to encode
> anything the Unicode APIs can handle.

If the Unicode APIs only have correct unicode, sure.  If not you'll
get errors translating to UTF-8 (and the byte APIs are supposed to
pass bad names through unaltered.)  Kinda ironic, no?


-- 
Adam Olsen, aka Rhamphoryncus
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4