char 128? no... 256

Afanasiy abelikov72 at hotmail.com
Sun Feb 16 18:45:38 CET 2003


On Wed, 12 Feb 2003 11:26:42 -0800, Brian Quinlan <brian at sweetapp.com>
wrote:

>> All of my devices can display the TradeMark symbol correctly.
>> None of them can print the Unicode character 8482.
>
>These two statements seem contradictory.
>
>> I never use Unicode.
>
>But you are using it in this case.
>
>> The TradeMark symbol is being encoded to that Unicode value, 8482.
>> I would like to decode that back to what I assume is iso-8859-1.
>> However, encoding back to iso-8859-1 only allows characters under 
>> 256.
>
>So now you understand that what you want is impossible, right? That's
>like saying that you want to convert a Japanese character to ASCII.
>
>Your machine might be using the windows-1252 encoding. Try:
>
>print unichr(8482).encode('windows-1252')
>
>Cheers,
>Brian

Completely possible and implemented. The specific symbol I was
experiencing a problem with was not the TradeMark symbol, but
I use it as such. CP-1250 is pretty damn useful now that I know
what it is. I consider it much better than anything else.

Thank you Microsoft.




More information about the Python-list mailing list