Re: how to make format operator % work with unicode as expected

2008-01-27 Thread Marc 'BlackJack' Rintsch
On Sun, 27 Jan 2008 16:00:42 +, Peter Pei wrote: > "Marc 'BlackJack' Rintsch" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] >> On Sun, 27 Jan 2008 05:32:40 +, Peter Pei wrote: >> >>> You didn't understand my question, but thanks any way. >>> >>> Yes, it is true that %s alr

Re: how to make format operator % work with unicode as expected

2008-01-27 Thread Peter Pei
"Marc 'BlackJack' Rintsch" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Sun, 27 Jan 2008 05:32:40 +, Peter Pei wrote: > >> You didn't understand my question, but thanks any way. >> >> Yes, it is true that %s already support unicode, and I did not contradict >> that. But it

Re: how to make format operator % work with unicode as expected

2008-01-27 Thread Peter Pei
"Steven D'Aprano" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Sun, 27 Jan 2008 05:32:40 +, Peter Pei wrote: > >> You didn't understand my question, but thanks any way. >> >> Yes, it is true that %s already support unicode, and I did not >> contradict that. But it counts t

Re: how to make format operator % work with unicode as expected

2008-01-27 Thread Peter Pei
"I V" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Sun, 27 Jan 2008 05:32:40 +, Peter Pei wrote: >> Yes, it is true that %s already support unicode, and I did not >> contradict that. But it counts the number of bytes instead of >> characters, and makes things like %-20s ou

Re: how to make format operator % work with unicode as expected

2008-01-27 Thread Diez B. Roggisch
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 ca

Re: how to make format operator % work with unicode as expected

2008-01-27 Thread Colin J. Williams
Peter Pei wrote: > You didn't understand my question, but thanks any way. > > Yes, it is true that %s already support unicode, and I did not > contradict that. But it counts the number of bytes instead of > characters, and makes things like %-20s out of alignment. If you don't > understand my a

Re: how to make format operator % work with unicode as expected

2008-01-27 Thread Marc 'BlackJack' Rintsch
On Sun, 27 Jan 2008 05:32:40 +, Peter Pei wrote: > You didn't understand my question, but thanks any way. > > Yes, it is true that %s already support unicode, and I did not contradict > that. But it counts the number of bytes instead of characters, and makes > things like %-20s out of align

Re: how to make format operator % work with unicode as expected

2008-01-27 Thread Stefan Behnel
Ever heard the word "PLONK"? Peter Pei harshly top-posted: > You didn't understand my question, but thanks any way. > > Yes, it is true that %s already support unicode, and I did not > contradict that. But it counts the number of bytes instead of > characters, and makes things like %-20s out of a

Re: how to make format operator % work with unicode as expected

2008-01-27 Thread John Machin
On Jan 27, 3:06 pm, "Peter Pei" <[EMAIL PROTECTED]> 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 > characte

Re: how to make format operator % work with unicode as expected

2008-01-26 Thread Steven D'Aprano
On Sun, 27 Jan 2008 05:32:40 +, Peter Pei wrote: > You didn't understand my question, but thanks any way. > > Yes, it is true that %s already support unicode, and I did not > contradict that. But it counts the number of bytes instead of > characters, and makes things like %-20s out of alignme

Re: how to make format operator % work with unicode as expected

2008-01-26 Thread I V
On Sun, 27 Jan 2008 05:32:40 +, Peter Pei wrote: > Yes, it is true that %s already support unicode, and I did not > contradict that. But it counts the number of bytes instead of > characters, and makes things like %-20s out of alignment. If you don't > understand my assertion, please don't argu

Re: how to make format operator % work with unicode as expected

2008-01-26 Thread Peter Pei
s%-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? > > M

Re: how to make format operator % work with unicode as expected

2008-01-26 Thread Peter Pei
I just sorted posts by from, and figured out that you are kind of PSF guy... However that does not make you qualified, I care whether you are capable not whether you have the time to spend for PSF. Adios! == "Peter Pei" <[EMAIL PROTECTED]> wrote in message

Re: how to make format operator % work with unicode as expected

2008-01-26 Thread Peter Pei
You didn't understand my question, but thanks any way. Yes, it is true that %s already support unicode, and I did not contradict that. But it counts the number of bytes instead of characters, and makes things like %-20s out of alignment. If you don't understand my assertion, please don't argue

Re: how to make format operator % work with unicode as expected

2008-01-26 Thread Steven D'Aprano
On Sun, 27 Jan 2008 04:06:45 +, Peter Pei 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 no

Re: how to make format operator % work with unicode as expected

2008-01-26 Thread Peter Pei
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... -- http://mail.python.org/mailman/listinfo/pytho

how to make format operator % work with unicode as expected

2008-01-26 Thread Peter Pei
I resolve this issue? My issue is "how to make format operator % work with unicode as expected", and has nothing to do with tkinter. If I want to use a table widget or something, I can. But that's not the question. -- http://mail.python.org/mailman/listinfo/python-list