homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: glob doesn't return unicode with unicode parameter
Type: behavior Stage:
Components: Library (Lib) Versions: Python 2.5
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: georg.brandl, gradha, lcantey, orsenthil, pitrou
Priority: normal Keywords:

Created on 2007年08月20日 07:08 by gradha, last changed 2022年04月11日 14:56 by admin. This issue is now closed.

Messages (6)
msg32666 - (view) Author: Grzegorz Adam Hankiewicz (gradha) Date: 2007年08月20日 07:08
Unless I'm not understanding a previous bug report, I see this is a regression of http://sourceforge.net/tracker/index.php?func=detail&aid=1001604&group_id=5470&atid=305470.
Here's an interactive session with 2.5.1 on WXP:
In [1]: import sys
In [2]: sys.version
Out[2]: '2.5.1 (r251:54863, Apr 18 2007, 08:51:08) [MSC v.1310 32 bit (Intel)]'
In [3]: import glob
In [4]: glob.glob(u"*txt")
Out[4]: ['hola.txt', 'ma\xf1ana.txt']
In [5]: glob.glob(u"./*txt")
Out[5]: [u'.\\hola.txt', u'.\\ma\xf1ana.txt']
msg32667 - (view) Author: Senthil Kumaran (orsenthil) * (Python committer) Date: 2007年08月21日 17:31
This seems very much windows specific (someone needs to test on mac/other os as well). On linux, verified that glob unicode-in, unicode-out works fine.
msg55305 - (view) Author: Grzegorz Adam Hankiewicz (gradha) Date: 2007年08月26日 09:29
Previous bug report would be now http://bugs.python.org/issue1001604.
msg71707 - (view) Author: Lee Cantey (lcantey) Date: 2008年08月22日 00:17
Updated original report with the following:
2.5.1 (r251:54863, Jul 10 2008, 17:24:48)
Fails for me with 2.5.1 on Linux, OS X, and Windows.
>>> glob.glob("*")
['t.txt', 't\xd0\xb4.txt', 't\xe2\xbd\x94.txt']
>>> glob.glob(u"*")
['t.txt', 't\xd0\xb4.txt', 't\xe2\xbd\x94.txt']
>>> glob.glob(u"./*")
[u'./t.txt', u'./t\u0434.txt', u'./t\u2f54.txt']
msg71754 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2008年08月22日 15:57
Seems fixed on 2.6.
Python 2.6b3+ (trunk, Aug 22 2008, 11:27:51) [MSC v.1500 32 bit (Intel)]
on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import glob
>>> glob.glob("*.py")
['iocrash.py', 'setup.py']
>>> glob.glob(u"*.py")
[u'iocrash.py', u'setup.py']
>>> glob.glob(u"./*.py")
[u'.\\iocrash.py', u'.\\setup.py']
msg76992 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2008年12月05日 09:29
I see the same as Antoine, this is fixed in 2.6.
History
Date User Action Args
2022年04月11日 14:56:26adminsetgithub: 45330
2008年12月05日 09:29:55georg.brandlsetstatus: open -> closed
resolution: fixed
messages: + msg76992
nosy: + georg.brandl
2008年08月22日 15:57:27pitrousetnosy: + pitrou
messages: + msg71754
2008年08月22日 00:17:08lcanteysetnosy: + lcantey
messages: + msg71707
2007年08月26日 09:29:15gradhasettype: behavior
messages: + msg55305
2007年08月20日 07:08:14gradhacreate

AltStyle によって変換されたページ (->オリジナル) /