Qian Xu wrote: > Hi All, > > why the code > print len(u"»test«") > returns 8 instead of 6? > > Best regards > Qian
I have solved the problem myself.
# -*- coding: utf-8 -*-
print len(u"»test«")
--- or ---
s = "»test«"
print len(s.decode("utf-8"))
--Qian
--
http://mail.python.org/mailman/listinfo/python-list
