I need to make the cp932 (it is expanded shift-jis
)
UnicodeEncodeError: 'cp932' codec can't encode character '\u270c' in position 0: illegal multibyte sequence
import codecs
mytext = '\u270c'
with codecs.open(path,mode='w',encoding='cp932') as f:
mytext.encode('cp932',"ignore")
f.write(mytext)
exit()
I just simplify the mytext
for this article.
I think this character pass the encode with ignore flg.
However, write
shows the error.
Is there any way to solve this??