On 6/13/07, Andre Engels <[EMAIL PROTECTED]> wrote:
> 2007/6/12, WolfgangZ <[EMAIL PROTECTED]>:
> > hzqij schrieb:
> > > i have a python source code test.py
> > >
> > > # -*- coding: UTF-8 -*-
> > >
> > > # s is a unicode string, include chinese
> > > s = u'张三'
> > >
> > > then i run
> > >
> > > $
2007/6/12, WolfgangZ <[EMAIL PROTECTED]>:
> hzqij schrieb:
> > 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 po
On Jun 12, 12:29 pm, "Evan Klitzke" <[EMAIL PROTECTED]> wrote:
> On 6/12/07, hzqij <[EMAIL PROTECTED]> wrote:
>
> > i have a python source code test.py
>
> > # -*- coding: UTF-8 -*-
>
> As Marc pointed out, you should test the actual file encoding of the
> program to check that it is, in fact, UTF-
On 6/12/07, hzqij <[EMAIL PROTECTED]> wrote:
> i have a python source code test.py
>
> # -*- coding: UTF-8 -*-
As Marc pointed out, you should test the actual file encoding of the
program to check that it is, in fact, UTF-8 encoded. If you're on a
Unix/Linux system you should be able to test for a
hzqij schrieb:
> 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 i
In <[EMAIL PROTECTED]>, hzqij wrote:
> 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 p