Yusei TAHARA wrote:
> 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>

Thanks Yusei!

The above works within the Python console, but within a Zope Python 
script I get repeated username/password requests, finally failing with a 
'You are not allowed to access 'lookup' in this context'.

Within a Zope External Method I get 'unknown encoding: iso-2022-jp'

However I just tried 'iso2022_jp' within an External Method and that 
worked. 'iso-2022-jp' is supposed to be an accepted alias of 
'iso2022_jp' but apparently the external method is unable to find it 
using the alias...

Anyway, hopefully now I'll be able to convert Japanese text in utf-8 to 
iso-2022-jp!  Thanks!

Zope maillist  -  Zope@zope.org
**   No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-dev )

Reply via email to