[Patches] [ python-Patches-1001604 ] glob doesn't return unicode with no dir in unicode filename

SourceForge.net noreply at sourceforge.net
Mon Aug 2 00:31:56 CEST 2004


Patches item #1001604, was opened at 2004-08-01 15:20
Message generated for change (Comment added) made by nnorwitz
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1001604&group_id=5470

>Category: None
>Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: leve (leve)
Assigned to: Nobody/Anonymous (nobody)
>Summary: glob doesn't return unicode with no dir in unicode filename

Initial Comment:
#Here is the script
#Python 2.3 on W2K
 
import glob
 
name = glob.glob(u"./*.mp3")[0]
print type(name)
name = glob.glob(u"*.mp3")[0]
print type(name)
 
##OUTPUT##
#<type 'unicode'>
#<type 'str'>
 
#The second line should be <type 'unicode'> too.



----------------------------------------------------------------------

>Comment By: Neal Norwitz (nnorwitz)
Date: 2004-08-01 18:31

Message:
Logged In: YES 
user_id=33168

The attached patch fixes the problem and all tests pass on
Linux.  But I'm not really sure if this should be fixed or
not.  Perhaps someone more familiar with unicode and
filenames (like Martin or Marc-Andre?) could provide
feedback.  I don't know if this could create any problems on
Windows.

Changing to a patch.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1001604&group_id=5470


More information about the Patches mailing list