japanese encoding iso-2022-jp in python vs. perl
"Martin v. Löwis"
martin at v.loewis.de
Tue Oct 23 20:57:30 CEST 2007
> var = var.encode("iso-2022-jp", "replace")
> print var
> So, what's the deal? Why can't python properly encode some of these
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 you using, and what is the precise string that
you want to encode? (use "print repr(var)" to report that exact value)
More information about the Python-list