2Dou/watermarker

UnicodeDecodeError: 'utf8' codec can't decode byte

Closed this issue · 1 comments

λ python marker.py -f a.jpg -m "中aaa"
Traceback (most recent call last):
  File "marker.py", line 160, in <module>
    main()
  File "marker.py", line 146, in main
    args.mark = args.mark.decode("utf-8")
  File "C:\Python27\lib\encodings\utf_8.py", line 16, in decode
    return codecs.utf_8_decode(input, errors, True)
UnicodeDecodeError: 'utf8' codec can't decode byte 0xa4 in position 1: invalid start byte

若用繁體中文

solve:
change this:

args.mark = args.mark.decode("utf-8")

to

args.mark = args.mark.decode("big5")