how to make format operator % work with unicode as expected

Peter Pei yantao at telus.com
Sun Jan 27 11:00:42 EST 2008


"Marc 'BlackJack' Rintsch" <bj_666 at gmx.net> wrote in message 
news:6031q9F1oh17aU1 at mid.uni-berlin.de...
> On Sun, 27 Jan 2008 05:32:40 +0000, 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 assertion,
>> please don't argue back and I am only interested in answers from those 
>> who
>> are qualified.
>
> I have the impression from your original post
>
>  […] because it is unicode, and one byte is not neccessary one character.
>
> that you confuse unicode and utf-8.  Are you sure you are qualified to ask
> such a question in the first place!?  :-þ
so you are saying, with utf-8 encoding a byte is a character, shame on you.
>
> Ciao,
> Marc 'BlackJack' Rintsch 




More information about the Python-list mailing list