LoginSignup
1
0

More than 5 years have passed since last update.

python3の結果が"Unicodeencodeerror"だった場合

Posted at

自分によく起こること

何故だか知らないけど急に出てくるエラーが以下

nicodeEncodeError: 'ascii' codec can't encode character '\u5ead' in position 0: ordinal not in range(128)

何故かasciiで何かをしているようで、本来はここはutf-8であるべき箇所

以下のコマンドで少なくとも一時的に解消される。

export LC_ALL=ja_JP.UTF-8
export LANG=ja_JP.UTF-8

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0