by shigemk2

当面は技術的なことしか書かない

2018-05-30から1日間の記事一覧

open excel from csv with cui

Mac

open -a "Microsoft Excel" test.csv

Python unicodeな文字列でreplaceとかformatとかやったときの挙動

unicodeな文字列でreplaceとかformatとかやったときの挙動 >>> a = "日本語".decode("utf-8") >>> a u'\u65e5\u672c\u8a9e' >>> b = "{}".format(a) Traceback (most recent call last): File "<stdin>", line 1, in <module> UnicodeEncodeError: 'ascii' codec can't enco</module></stdin>…