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.43k stars 800 forks source link

sys.getfilesystemencoding() returns None; causes docutils error #131

Open damonkohler opened 9 years ago

damonkohler commented 9 years ago

From @GoogleCodeExporter on May 31, 2015 11:30

What device(s) are you experiencing the problem on?

NEC LifeTouchNote (A Japanese ANDROID device)

What firmware version are you running on the device?

Not known. Probably firmware version is not a problem.

What steps will reproduce the problem?

1. Open Python shell on an android device.
2. Enter 'import sys; print sys.filesystemencoding()'
3.

What is the expected output? What do you see instead?

A string "UTF-8" or "mbcs" expected, but sees None.
This causes an error in running docutils.
My purpose is to invoke docutils.

What version of the product are you using? On what operating system?

android 2.2 & PythonForAndroid_r4.apk

Please provide any additional information below.

sys.filesystemencoding() is called within utils.py of docutils.

Original issue reported on code.google.com by textdire...@gmail.com on 30 Sep 2011 at 1:39

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

damonkohler commented 9 years ago

From @GoogleCodeExporter on May 31, 2015 11:30

[deleted comment]
damonkohler commented 9 years ago

From @GoogleCodeExporter on May 31, 2015 11:30

[deleted comment]
damonkohler commented 9 years ago

From @GoogleCodeExporter on May 31, 2015 11:30

Hit this too, one can check it happend on several Android version (2.2, 2.3, 
3.1 checked). Used PythonForAndroid_r5.apk

This made os.path.isdir(x), os.path.isfile(x), os.listdir(x), os.remove(x) [x 
unicode] to throw UnicodeEncodeError.

Original comment by anthony....@gmail.com on 26 Nov 2011 at 10:27

damonkohler commented 9 years ago

From @GoogleCodeExporter on May 31, 2015 11:30

This is really a Python issues, and should be moved to 
http://code.google.com/p/python-for-android/

Original comment by rjmatthews62 on 26 Nov 2011 at 9:42

damonkohler commented 9 years ago

From @GoogleCodeExporter on May 31, 2015 11:30

Created http://code.google.com/p/python-for-android/issues/detail?id=35

Original comment by anthony....@gmail.com on 28 Nov 2011 at 10:28