Message181731
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 |
|
Date |
User |
Action |
Args |
2013-02-09 10:35:43 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, loewis, ezio.melotti, umedoblock |
2013-02-09 10:35:43 | serhiy.storchaka | set | messageid: <1360406143.6.0.208238695607.issue17156@psf.upfronthosting.co.za> |
2013-02-09 10:35:43 | serhiy.storchaka | link | issue17156 messages |
2013-02-09 10:35:43 | serhiy.storchaka | create | |
|