A Unicode problem -HELP

manstey manstey at csu.edu.au
Thu May 11 23:34:39 EDT 2006


I am writing a program to translate a list of ascii letters into a
different language that requires unicode encoding. This is what I have
done so far:

1. I have # -*- coding: UTF-8 -*- as my first line.
2. In Wing IDE I have set Default Encoding to UTF-8
3. I have imported codecs and opened and written my file, which doesn't
have a BOM, as encoding=UTF-8
4. I have written a dictionary for translation, with entries such as
{'F':u'\u0254'} and a function to do the translation

Everything works fine, except that my output file, when loaded in
unicode aware emeditor has
(u'F', u'\u0254')

But I want to display it as:
('F', 'ɔ') # where the ɔ is a back-to-front 'c'

So my questions are:
1. How do I do this?
2. Do I need to change any of my steps above?




More information about the Python-list mailing list