how to make format operator % work with unicode as expected

John Machin sjmachin at lexicon.net
Sun Jan 27 02:56:31 EST 2008


On Jan 27, 3:06 pm, "Peter Pei" <yan... at telus.com> wrote:
> I probably should mention that what I want is to make all parts of the
> string aligned, and look like table. I am not looking for other ways to make
> it table-alike, but only interested in making % work with unicode -counting
> characters not bytes...

Can you show some *code* that demonstrates the alleged problem?
E.g. len("<some format>" % some_unicode) != expected_len

Reading this may help:
http://www.chiark.greenend.org.uk/~sgtatham/bugs.html




More information about the Python-list mailing list