getting data with proper encoding to the finish
John Machin
sjmachin at lexicon.net
Mon Mar 14 21:01:42 EST 2005
Serge Orlov wrote:
> Looking at the following function in pyXLWriter
> def _asc2ucs(s):
> """Convert ascii string to unicode."""
> return "\x00".join(s) + "\x00"
>
> I can guess several things:
> a) pyXLWriter author is an ascii guy :)
Shrewd guess :-)
> b) unicode strings are not supported by pyXLWriter
But that _asc2ucs() is used ONLY in write_url* methods ... so there's
hope yet.
> c) excel keeps unicode text in utf-16le
Uh-huh. MS-everything is LE.
>
> Ksenia, try encoding unicode strings in utf-16le before passing them
to
> pyXLWriter . If that doesn't work that means pyXLWriter requires
> changes to support unicode strings.
>
> Serge.
More information about the Python-list
mailing list