How to wrap a Japanese text in Python

prashantkisanpatil at gmail.com prashantkisanpatil at gmail.com
Thu Jun 7 14:12:16 CEST 2007


Hi All,

I am trying to wrap a japanese text in Python, by the following code.

if len(message) > 54:
   message = message.decode("UTF8")
   strlist = textwrap.wrap(message,54)

After this I am wirting it to you a CAD Software window. While
displaying in this window some Japanese characters at the end of the
line & some at the begining of the line are not displayed at all.
Meaning the text wrapping is not happening correctly.

Can any body please help me out in resolving this problem.

Thanks in advance.

Regards,
Prashant




More information about the Python-list mailing list