Mercurial > cpython-lru_cache-weakref
comparison Python/pythonrun.c @ 47599:e2eb70235392
Issue 1342: Python could not start if installed in a directory
with non-ascii characters.
This is the simple fix, which uses the FileSystemEncoding.
Replacing all the char* with unicode strings is a major rewrite,
and needs more thinking.
| author | Amaury Forgeot d'Arc <amauryfa@gmail.com> |
|---|---|
| date | Wed, 11 Jun 2008 17:40:47 +0000 |
| parents | 94f64f11fdd0 |
| children | da47e7e135ae |
comparison
equal
deleted
inserted
replaced
| 47597:4dd10037088c | 47599:e2eb70235392 |
|---|---|
| 693 PyObject *bimod = NULL; | 693 PyObject *bimod = NULL; |
| 694 PyObject *m; | 694 PyObject *m; |
| 695 PyObject *std = NULL; | 695 PyObject *std = NULL; |
| 696 int status = 0, fd; | 696 int status = 0, fd; |
| 697 PyObject * encoding_attr; | 697 PyObject * encoding_attr; |
| 698 char *encoding, *errors; | 698 char *encoding = NULL, *errors; |
| 699 | 699 |
| 700 /* Hack to avoid a nasty recursion issue when Python is invoked | 700 /* Hack to avoid a nasty recursion issue when Python is invoked |
| 701 in verbose mode: pre-import the Latin-1 and UTF-8 codecs */ | 701 in verbose mode: pre-import the Latin-1 and UTF-8 codecs */ |
| 702 if ((m = PyImport_ImportModule("encodings.utf_8")) == NULL) { | 702 if ((m = PyImport_ImportModule("encodings.utf_8")) == NULL) { |
| 703 goto error; | 703 goto error; |
