[reportlab-users] How to insert Chinese Simplified (multibyte) into Table

Andy Robinson reportlab-users@reportlab.com
Fri, 17 Jan 2003 08:03:05 -0000


> ........
> If I replace 'North', 'South', 'East' and 'West'
> with Chinese Simplified directly in test_platypus_tables.py,
> I can not see those Chinese titles in the generated pdf file
> instead of strange characters.
> 
If test_multibyte_chs.py works for you but the above
does not, you are probably seeing your chinese data in
'latin-1' i.e. as single byte Times Roman or Helvetica
characters.

Make sure the font being used for that table style is
a correct Chinese font in the same encoding as you are
sending the data in!  The important part of test_multibyte_chs.py
is the part at the top, which registers the fonts.

If that does not work, send a whole working script
with your text in escaped strings, and we can look
at it.

Thanks,

Andy Robnson