[Zope] How to display unicode character given its code

Itai Tavor itai at iinet.net.au
Mon Jul 25 06:21:11 EDT 2005


Hi,

This is a bit OT but this list is the best place I know to ask it :)

I have a form which uses UTF-8, the text entered in the form then has  
to be converted to iso-2022-jp. If any character is entered that  
isn't valid for iso-2022-jp I get:

UnicodeError: ISO-2022-JP encoding error: invalid character \u2013

What I need to do is display the offending character in the error  
message. So the question is, how do I take the '2013' and display the  
appropriate character?

TIA, Itai


More information about the Zope mailing list