On Thu, 19 Feb 2009 15:28:12 +0900, Dietrich Bollmann wrote:
> Hi,
>
> Are there any functions in python to convert between different Japanese
> coding systems?
If I'm not mistaken, the email standard specifies that only 7-bit ASCII-
encoded bytes can be transported safely and reliably. The high
import email
from email.Header import decode_header
from unicodedata import name as un
MS = '''\
Subject: =?UTF-8?Q?
romaji=E3=81=B2=E3=82=89=E3=81=8C=E3=81=AA=E3=82=AB=E3=82=BF?=
Date: Thu, 19 Feb 2009 09:34:56 -
MIME-Version: 1.0
Content-Type: text/plain; charset=EUC-JP
Content-Transfer-Enco
On Feb 19, 2:28 pm, Dietrich Bollmann wrote:
> Are there any functions in python to convert between different Japanese
> coding systems?
>
> I would like to convert between (at least) ISO-2022-JP, UTF-8, EUC-JP
> and SJIS. I also need some function to encode / decode base64 encoded
> strings.
>
>
Dietrich Bollmann wrote:
> I get the strings (which actually are emails) from a server on the
> internet with:
>
> import urllib
> server = urllib.urlopen(serverURL, parameters)
> email = server.read()
>
> The coding systems are given in the response string:
>
> Example:
>
> email = '''[
Hi,
Are there any functions in python to convert between different Japanese
coding systems?
I would like to convert between (at least) ISO-2022-JP, UTF-8, EUC-JP
and SJIS. I also need some function to encode / decode base64 encoded
strings.
I get the strings (which actually are emails) from a s