JapaneseCodecs version 1.4.8 WindowsCE distribution package
============================
02/09/29 20:42 (by Telion)
This is a Japanese Codecs for PythonCE.
(tested only on 2.2+ HPC2000 MIPS)
This package enables you to read and write
japanese text written in EUC(ujis) and JIS(jis-7),
in addition to Unicode and mbcs(Shift-Jis)
that come with Python.
If you have downloaded JapaneseCodecs148-CE-mini.zip,
this contains only neccessary files for CE.
For the complete package that contains test scripts,
C source code, and pure Python version, please download
JapaneseCodecs148-CE.zip
(Please note that test scripts and pur python version
will not run unmodified on CE)
I only compiled and added binaries and
this readme file for CE, for your convenience.
Please read README.en furnished by the author,
Mr. Tamito Kajiyama.
Installing:
To install on CE, unzip and copy 'japanese' directory
and japanese.pth into site-packages
or any other place sys.path is set.
(You don't have to copy japanese/python and japanese/mappings)
Rename _japanese_codecs.pyd.arm (or mips) to
_japanese_codecs.pyd, accroding to the CPU of your CE machine.
Restart Python and try this.
See if it returns module name and things like that.
>>> import sys
>>> sys.modules['japanese']
If it cause an error, this should do.
>>> import japanese
If that fails, probably your sys.path setting does not
include the directory where you have installed japanese codecs.
Verify in your site.py and modify as necessary.
Now, test this.
>>> ustr = unicode('あいう','mbcs')
>>> ustr
u'\u3042\u3044\u3046'
Then, test japanese codecs itself.
>>> ustr.encode('ujis')
'\xa4\xa2\xa4\xa4\xa4\xa6'
>>> ustr.encode('jis-7')
'\x1b$B$"$$$&\x1b(B'
>>> ustr.encode('sjis')
'\x82\xa0\x82\xa2\x82\xa4'
If you obtained same result as above,
you have successfully installed japanese codecs.
Using Japanese Codecs:
Unicode --> EUC
euc-string = u-string.encode('ujis')
EUC --> Unicode
u-string = unicode(euc-string,'ujis')
Unicode --> Jis
jis-string = u-string.encode('jis-7')
Jis --> Unicode
u-string = unicode(jis-string,'jis-7')
Unicode --> Shif-Jis(mbcs)
sjis-string = u-string.encode('mbcs')
Shift-Jis(mbcs) --> Unicode
u-string = unicode(sjis-string,'mbcs')
Note:
Only C version works (due to restrained memory space of CE?).
Pure-python version is included in this package for information purpose.
But this isn't a set back since C version is faster and more compact.
Test suites does not work due to lack of current directory on CE.
setup.py and uninstall.py will not work, either.
Questions, Comments:
Please address to me for CE related questions.
Telion
lac@ccapcable.com
http://pages.ccapcable.com/lac/PythonCE.html
General questions about japaneseCodecs:
Tamito Kajiyama
http://www.asahi-net.or.jp/~rd6t-kjym/python/index.html
               (
geocities.com/telionce)