[reportlab-users] Using locale's content with reportlab

Dinu Gherman gherman at darwin.in-berlin.de
Mon Apr 30 12:32:29 EDT 2007


Hi,

I'm posting this here since I assume there are more people using
reportlab with non-European languages. I'm having difficulties to
access localised strings using Python's locale module in order to
reuse them with reportlab. This is despite the fact that my plat-
form (and Python on it) seems to support such languages.

I've attached a sample script, trying to print some month names as
an example for different languages. Setting all these languages
works fine (the locale module doesn't complain), but some simply
don't return what I'd expect. Among these are Greek and all Asian
languages I tested (Japanese, Chinese and Korean).

My default encoding is ASCII, but changing it to UTF-8 didn't help
either. And I also don't really understand why in both cases I have
to decode from latin1 first (see function foo).

Any ideas welcome - thanks!

Dinu

-------------- next part --------------
A non-text attachment was scrubbed...
Name: loc.py
Type: application/octet-stream
Size: 1128 bytes
Desc: not available
Url : <http://two.pairlist.net/pipermail/reportlab-users/attachments/20070430/7c56205a/attachment.obj>
-------------- next part --------------

--
Dinu C. Gherman
......................................................................
I love my Mac. I just wish it came in green! - www.greenmyapple.com


More information about the reportlab-users mailing list