Changes by xiaowei xw.ch...@gmail.com:
--
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17320
___
___
Python-bugs-list
Amaury Forgeot d'Arc added the comment:
The string '\xe7\x8e\xb0' is the utf-8 encoded version of u'现' (=u'\u73b0')
But your Windows system uses the cp936 code page to encode file names.
'\xe7\x8e\xb0' is invalid in this code page: the last character is an
incomplete multibyte sequence, and is
xiaowei added the comment:
thank you
os: win7 bit64
python: 2.7.3
import sys,locale
print(locale.getdefaultlocale())
('zh_CN', 'cp936')
print(sys.getdefaultencoding())
ascii
祝愉快!
肖微
2013年 月 日
2013/3/18 Amaury Forgeot d'Arc rep...@bugs.python.org
Amaury Forgeot d'Arc added the
Amaury Forgeot d'Arc added the comment:
There may be an issue with the GetFullPathName system call.
Could you copy the result of these functions:
import sys, locale
print(locale.getdefaultlocale())
print(sys.getdefaultencoding())
--
nosy: +amaury.forgeotdarc
New submission from xiaowei:
assert os.path.split( os.path.abspath('\xe7\x8e\xb0' ) )[-1] == '\xe7\x8e\xb0'
# it should be true(no error) but py2.7 in window it's false
# and when linux it's ok
# os.path.split( os.path.abspath('\xe7\x8e\xb0' ) )[-1] == '\xe7\x8e'
# i guess it's a real bug ,