How to fix: “UnicodeDecodeError: 'ascii' codec can't decode byte”

前端 未结 19 1773
谎友^
谎友^ 2020-11-22 01:21
as3:~/ngokevin-site# nano content/blog/20140114_test-chinese.mkd
as3:~/ngokevin-site# wok
Traceback (most recent call last):
File \"/usr/local/bin/wok\", line 4, in
         


        
19条回答
  •  执念已碎
    2020-11-22 02:08

    In order to resolve this on an operating system level in an Ubuntu installation check the following:

    $ locale charmap
    

    If you get

    locale: Cannot set LC_CTYPE to default locale: No such file or directory
    

    instead of

    UTF-8
    

    then set LC_CTYPE and LC_ALL like this:

    $ export LC_ALL="en_US.UTF-8"
    $ export LC_CTYPE="en_US.UTF-8"
    

提交回复
热议问题