Author serhiy.storchaka
Recipients ezio.melotti, loewis, serhiy.storchaka, umedoblock
Date 2013-02-09.10:35:43
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1360406143.6.0.208238695607.issue17156@psf.upfronthosting.co.za>
In-reply-to
Content
Default encoding on Python 3 is UTF-8. You should declare your encoding at the top of file if it differs from UTF-8 or ASCII (i.e. "# -*- coding: euc-jp -*-"). Otherwise Python will reject your file (for Shift_JIS and EUC-JP) or produce incorrect result (for ISO-2022-JP).

$ python3 konnichiha.Shift_JIS.py
  File "konnichiha.Shift_JIS.py", line 5
SyntaxError: Non-UTF-8 code starting with '\x82' in file konnichiha.Shift_JIS.py on line 5, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details
$ python3 konnichiha.ISO-2022-JP.py
konnichiha
B$3$s$K$A$O
History
Date User Action Args
2013-02-09 10:35:43serhiy.storchakasetrecipients: + serhiy.storchaka, loewis, ezio.melotti, umedoblock
2013-02-09 10:35:43serhiy.storchakasetmessageid: <1360406143.6.0.208238695607.issue17156@psf.upfronthosting.co.za>
2013-02-09 10:35:43serhiy.storchakalinkissue17156 messages
2013-02-09 10:35:43serhiy.storchakacreate