wrote:

> As an example I would like to do this kind of conversion:
> \uc3B4 => ô
> for all available html entities.

>>> u"\u3cB4".encode('ascii','xmlcharrefreplace')
'㲴'

Don't bother using named entities. If you encode your unicode as ascii  
replacing all non-ascii characters with the xml entity reference then your 
pages will display fine whatever encoding is specified in the HTTP headers.
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to