[Zope] japanese encoding

Andrew Milton akm at theinternet.com.au
Fri Feb 26 14:33:42 EST 2010


+-------[ Aaron Maupin ]----------------------
| Hi guys,
| 
| I'm having trouble installing and using the japanese codecs (from
| http://www.python.jp/pub/JapaneseCodecs )with Zope on a shared host.  I
| just can't seem to get the encodings available for the python used by
| the Zope install.

[snip]

| ----
| import japanese  #works
| 
| print japanese
| #<module 'japanese' from
| '/home/USERNAME/webapps/zope/zinstance/parts/instance/lib/python/japanese/__init__.pyc'>
| #however there's nothing in
| /home/USERNAME/webapps/zope/zinstance/parts/instance/lib/python/ except
| a README.txt saying this directory will hold additional installed
| packages... should there be something here?
| 
| text = 'blah blah'  #okay
| text = unicode(text, 'utf-8')  #okay
| text = text.encode('japanese.iso-2022-jp')  #fails with lookuperror

Tried simply; text.encode('iso-2022-jp') ?


-- 
Andrew Milton
akm at theinternet.com.au


More information about the Zope mailing list