H
hzqij
i have a python source code test.py
# -*- coding: UTF-8 -*-
# s is a unicode string, include chinese
s = u'ÕÅÈý'
then i run
$ python test.py
UnicodeDecodeError: 'utf8' codec can't decode bytes in position 0-1:
invalid data
by in python interactive, it is right
why?
# -*- coding: UTF-8 -*-
# s is a unicode string, include chinese
s = u'ÕÅÈý'
then i run
$ python test.py
UnicodeDecodeError: 'utf8' codec can't decode bytes in position 0-1:
invalid data
by in python interactive, it is right
why?