hex dump w/ or w/out utf-8 chars

MRAB python at mrabarnett.plus.com
Mon Jul 8 23:38:04 CEST 2013


On 08/07/2013 21:56, Dave Angel wrote:
> On 07/08/2013 01:53 PM, ferdy.blatsco at gmail.com wrote:
>> Hi Steven,
>>
>> thank you for your reply... I really needed another python guru which
>> is also an English teacher! Sorry if English is not my mother tongue...
>> "uncorrect" instead of "incorrect" (I misapplied the "similarity
>> principle" like "unpleasant...>...uncorrect").
>>
>> Apart from these trifles, you said:
>>>> All characters are UTF-8, characters. "a" is a UTF-8 character. So is "ă".
>> Not using python 3, for me (a programmer which was present at the beginning of
>> computer science, badly interacting with many languages from assembler to
>> Fortran and from c to Pascal and so on) it was an hard job to arrange the
>> abrupt transition from characters only equal to bytes to some special
>> characters defined with 2, 3 bytes and even more.
>
> Characters do not have a width.
[snip]

It depends what you mean by "width"! :-)

Try this (Python 3):

 >>> print("A\N{FULLWIDTH LATIN CAPITAL LETTER A}")
AA




More information about the Python-list mailing list