Unicode 3 digit decimal conversion

Rune Hansen rune.hansen at viventus.no
Sat Sep 27 06:41:14 EDT 2003


Hi , yes, of course *blush*.
Thanks

/regards

/rune

Klaus Alexander Seistrup wrote:
> Rune Hansen wrote:
> 
> 
>>>>>unicode("Gratis øl","iso-8859-1")
>>
>>u'Gratis \xf8l'
>>
>>>>>ord("\xf8")
>>
>>248
>>
>>What I need is the converted string to read u'Gratis \248l' (*
>>How do I do this without going through each and every character
>>of the string?
> 
> 
> How about
> 
> #v+
> 
> 
>>>>print unicode('Gratis øl', 'iso-8859-1').encode('utf-8')
> 
> Gratis øl
> 
> 
> #v-
> 
> 
>   // Klaus
> 





More information about the Python-list mailing list