how to make format operator % work with unicode as expected

Diez B. Roggisch deets at nospam.web.de
Sun Jan 27 09:15:10 EST 2008


Peter Pei schrieb:
> I am using things like "%-20s%-60s%-10s" in tkinter listbox to make it 
> look like a table, with mono sized font like lucie system. But this does 
> not work with data contains "Les misérables", because it is unicode, and 
> one byte is not neccessary one character. Now how can I resolve this issue?

By learning that unicode is not UTF-8, instead of insulting others of 
being incompetent.


Diezz



More information about the Python-list mailing list