Closed GoogleCodeExporter closed 9 years ago
If you find a way to do it in the standard Python interpreter the same way
could be used in PyScripter, but I am not sure how this could be done. This is
not a PyScripter issue but a Python one.
Original comment by pyscripter
on 18 Aug 2010 at 10:50
This is off topic but regarding the support for file names that contain french
characters the following info might be useful.
If you look the PyScripter help file in the topic "Encoded Python Source Files"
(last paragraph) it tells you how to configure Python to support other
encodings by modifying the site.py file. This file is in the lib subdirectory
of the Python installation directory. Find the function setencoding and make
sure that the support locale aware default string encodings is on. (see below)
def setencoding():
"""Set the string encoding used by the Unicode implementation. The
default is 'ascii', but if you're willing to experiment, you can
change this."""
encoding = "ascii" # Default value set by _PyUnicode_Init()
if 1: <<<<<<<<<<<<<-------------------------------------
# Enable to support locale aware default string encodings.
import locale
loc = locale.getdefaultlocale ()
if loc[1]:
encoding = loc[1]
if 0:
# Enable to switch off string to Unicode coercion and implicit
# Unicode to string conversion.
encoding = "undefined"
if encoding != "ascii":
# On Non-Unicode builds this will raise an AttributeError...
sys.setdefaultencoding (encoding) # Needs Python Unicode build !
I think this should solve your problems
Original comment by pyscripter
on 18 Aug 2010 at 10:51
Original issue reported on code.google.com by
htcvi...@gmail.com
on 18 Aug 2010 at 8:15