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/1999-November/001119.html below:

[Python-Dev] Internationalization Toolkit

[Python-Dev] Internationalization ToolkitMark Hammond mhammond@skippinet.com.au
Wed, 10 Nov 1999 09:27:45 +1100
> I think his proposal will go a long way towards your toolkit.  I
hope
> to hear soon from anybody who disagrees with Marc-Andre's proposal,

No disagreement as such, but a small hole:

From the proposal:

Internal Argument Parsing:
--------------------------
...
's':	For Unicode objects: auto convert them to the <default encoding>
	and return a pointer to the object's <defencbuf> buffer.

--
Excellent - if someone passes a Unicode object, it can be
auto-converted to a string.  This will allow "open()" to accept
Unicode strings.

However, there doesnt appear to be a reverse.  Eg, if my extension
module interfaces to a library that uses Unicode natively, how can I
get a Unicode object when the user passes a string?  If I had to
explicitely check for a string, then check for a Unicode on failure it
would get messy pretty quickly...  Is it not possible to have "U" also
do a conversion?

Mark.




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