On Fri, May 20, 2005 at 12:16:15AM -0700, [EMAIL PROTECTED] wrote:
> Hello, I think the answer is basically correct but shift-jis is not a
> standard part of Python 2.3.
Ah, I was fooled --- I tested on Python 2.3, but my packager must have
included the codecs you went on to mention.
Jeff
pgp4q
PyTJ wrote:
> I need to convert a Japanese Shift-JIS CSV file to Unicode UTF-8.
>
> My machine is a Windows 98 english computer with Python 2.3.4
>
> Any hints?.
>
First, you need to install codecs to support japanese encodings.
Python 2.3.* does not support SJIS by default.
I'll give you two
Hello,
I think the answer is basically correct but shift-jis is not a standard
part of
Python 2.3. You will either need to use Python 2.4 where the cjkcodes
are integrated or install them under Python 2.3. The link is
http://cjkpython.i18n.org/
You then also need:
import cjkcodecs.aliases
Richard
I think you do something like this (untested):
import codecs
def transcode(infile, outfile, incoding="shift-jis",
outcoding="utf-8"):
f = codecs.open(infile, "rb", incoding)
g = codecs.open(outfile, "wb", outcoding)
g.write(f.read())
# If the file is so large that it can't be
Hello everybody,
I need to convert a Japanese Shift-JIS CSV file to Unicode UTF-8.
My machine is a Windows 98 english computer with Python 2.3.4
Any hints?.
--
http://mail.python.org/mailman/listinfo/python-list