damonkohler / sl4a

SL4A brings scripting languages to Android by allowing you to edit and execute scripts and interactive interpreters directly on the Android device.
Apache License 2.0
2.42k stars 803 forks source link

Python glob.glob fails if a file has non-ASCII characters #162

Open damonkohler opened 9 years ago

damonkohler commented 9 years ago

From @GoogleCodeExporter on May 31, 2015 11:28

What device(s) are you experiencing the problem on?
Discovered problem on Archos A101 Internet Tablet. Haven't tried on other 
devices.

What steps will reproduce the problem?
1. Create a folder with a file with a non-ascii character in the filename (I 
discovered the error with ñ)
2. Run the following code:
   import glob
   glob.glob(u'/path/to/folder/*')

What is the expected output? What do you see instead?
It should return an array of unicode strings containing paths to the files in 
/path/to/folder.
Instead, it fails and quits.

Running the same code, with the exact same files on a folder on a desktop 
machine running a standard Python 2.6 returns the expected results.

What version of the product are you using? On what operating system?
SL4A version 3
Python for Android version 0
Android 2.2.1

Original issue reported on code.google.com by good.evi...@gmail.com on 14 Mar 2011 at 2:10

Copied from original issue: damonkohler/android-scripting#528