internationalization problem...

Johann programisci at NOSPAM.murator.com.pl
Thu May 2 11:16:17 EDT 2002


On Thu, 2 May 2002 16:55:43 +0200, "Werner Schiendl" <ws-news at gmx.at>
wrote:

>you must first convert the data you read from the file to unicode.
>As Martin already suggested:
>
>utf8_string = get_data_from_somewhere()
>target_string = unicode(utf8_string, 'utf-8').encode('iso-8859-2')
>
>or, in your example, use
>
>x = unicode(buf[1], 'utf-8')
>
>instead of x = buf[1]

Thanx, it helped. I have still problem with other two coding
(window-1250 and mac-pl) but I am afraid I have to write my own
functions for translation.

--
Johann






More information about the Python-list mailing list