Re: japanese encoding iso-2022-jp in python vs. perl

2007-10-24 Thread kettle
Thanks Leo, and everyone else, these were very helpful replies. The issue was exactly as Leo described, and I apologize for not being aware of it, and thus not quite reporting it correctly. At the moment I don't care about round-tripping between half-width and full-width kana, rather I need only

Re: japanese encoding iso-2022-jp in python vs. perl

2007-10-24 Thread Leo Kislov
On Oct 23, 3:37 am, kettle <[EMAIL PROTECTED]> wrote: > Hi, >   I am rather new to python, and am currently struggling with some > encoding issues.  I have some utf-8-encoded text which I need to > encode as iso-2022-jp before sending it out to the world. I am using > python's encode functions: > -

Re: japanese encoding iso-2022-jp in python vs. perl

2007-10-23 Thread Martin v. Löwis
> var = var.encode("iso-2022-jp", "replace") > print var [...] > ↓東京メトロ日比谷線・北千住行 > > So, what's the deal? Why can't python properly encode some of these > characters? It's not clear. As Ryan says, it works just fine (and so it does for me with Python 2.4.4 on Debian). What Python version are

RE: japanese encoding iso-2022-jp in python vs. perl

2007-10-23 Thread Ryan Ginstrom
> On Behalf Of kettle > I am rather new to python, and am currently struggling with some > encoding issues. I have some utf-8-encoded text which I need to > encode as iso-2022-jp before sending it out to the world. I am using > python's encode functions: > -- > var = var.encode("iso-2022-jp", "

japanese encoding iso-2022-jp in python vs. perl

2007-10-23 Thread kettle
Hi, I am rather new to python, and am currently struggling with some encoding issues. I have some utf-8-encoded text which I need to encode as iso-2022-jp before sending it out to the world. I am using python's encode functions: -- var = var.encode("iso-2022-jp", "replace") print var -- I am