Bug report #20475

UnicodeDecodeError: 'gbk' codec can't decode byte 0xac in position 211: illegal multibyte sequence

Added by law water about 6 years ago. Updated about 6 years ago.

Status:Closed
Priority:Normal
Assignee:-
Category:PyQGIS Console
Affected QGIS version:3.0.3 Regression?:No
Operating System:Windows 10 (64 bit) Easy fix?:No
Pull Request or Patch supplied:No Resolution:duplicate
Crashes QGIS or corrupts data:No Copied to github as #:28295

Description

I use windows OS, this error occured when I built python script which contains chinese character.

the python file was readly encoding by 'utf-8', It did not work when

`exec(open('C:/Users/xxx/QGIS/scripts/test.py'.encode('utf-8')).read())` in the python console. but

`exec(open('C:/Users/xxx/QGIS/scripts/test.py'.encode('utf-8'), 'rb').read())` worked well.


Related issues

Copied from QGIS Application - Bug report #20474: UnicodeDecodeError: 'gbk' codec can't decode byte 0xac in... Open 2018-11-13

History

#1 Updated by law water about 6 years ago

  • Copied from Bug report #20474: UnicodeDecodeError: 'gbk' codec can't decode byte 0xac in position 211: illegal multibyte sequence added

#2 Updated by Giovanni Manghi about 6 years ago

  • Resolution set to duplicate
  • Status changed from Open to Closed

Also available in: Atom PDF