Qian Xu wrote:

> why the code
>   print len(u"»test«")
> returns 8 instead of 6?

You may have declared an encoding that differs from the one your editor
actually uses, e. g.

# -*- coding: iso-8859-1 -*-
print len(u"»test«")

whereas your editor writes UTF-8.

Peter

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to