Discussion:
[I18n-sig] japanese, unicode and python
Zachary Mason
2006-02-01 01:39:18 UTC
Permalink
Hi. Im writing an NLP application that manipulates japanese
characters and downloads japanese web-pages, in particular results
pages for japanese search engines. Having a miserable time trying to
make it work so far. I have python 2.4.3, but the transformations
that seem to work for european languages throw errors for japan.
Pointers to useful resources or better yet examples of manipulating
japanese via python would be greatly appreciated.

thanks
Z. Mason
"Martin v. Löwis"
2006-02-12 19:38:47 UTC
Permalink
Post by Zachary Mason
Hi. Im writing an NLP application that manipulates japanese
characters and downloads japanese web-pages, in particular results
pages for japanese search engines. Having a miserable time trying to
make it work so far. I have python 2.4.3, but the transformations
that seem to work for european languages throw errors for japan.
Pointers to useful resources or better yet examples of manipulating
japanese via python would be greatly appreciated.
This is a pretty unspecific question. What's wrong with doing stuff
like

py> u"Hello \u3068\u306f".encode("eucJP")
'Hello \xa4\xc8\xa4\xcf'

Regards,
Martin

Loading...