getting data with proper encoding to the finish
sjmachin at lexicon.net
Tue Mar 15 03:01:42 CET 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
> 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
> pyXLWriter . If that doesn't work that means pyXLWriter requires
> changes to support unicode strings.
More information about the Python-list