[Python-Dev] Internationalization Toolkit
Mark 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.