Hi, Recent python includes japanese codecs so that you don't have to install JapaneseCodecs any longer. If you use python2.1, it is needed.
>>> import codecs >>> codecs.lookup('iso-2022-jp') <codecs.CodecInfo object for encoding iso2022_jp at 0x7fb1cd7a38d8> Regards, Yusei On Sat, 27 Feb 2010 04:27:23 +0900 Aaron Maupin <mau...@pastrytech.com> wrote: > 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. > > Or, that is, I have installed the codecs and can 'import japanese' but > whenever I try something like the following in a Python script: > > ---- > 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 > ---- > > LookupError: unknown encoding: japanese.iso-2022-jp > > This error also happens in an External Method. > > I have previously installed these codecs on an older version of Zope > (Zope-2.7.0) (old-style instance) and Python (2.3.4) on a dedicated > server, but am at a loss as to how to go about it with a Zope buildout > on a shared host (Zope 2.10.9 on Python 2.4.3). > > The guys at Webfaction are also at a loss, and suggested I ask here. > Anyone have any ideas? > > Aaron > > > _______________________________________________ > Zope maillist - Zope@zope.org > https://mail.zope.org/mailman/listinfo/zope > ** No cross posts or HTML encoding! ** > (Related lists - > https://mail.zope.org/mailman/listinfo/zope-announce > https://mail.zope.org/mailman/listinfo/zope-dev ) -- Yusei TAHARA <yu...@nexedi.com> _______________________________________________ Zope maillist - Zope@zope.org https://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope-dev )