[Python-checkins] r72230 - python/branches/pep-0383/Modules/posixmodule.c
martin.v.loewis
python-checkins at python.org
Sun May 3 10:01:50 CEST 2009
Author: martin.v.loewis
Date: Sun May 3 10:01:49 2009
New Revision: 72230
Log:
Convert environment variables.
Modified:
python/branches/pep-0383/Modules/posixmodule.c
Modified: python/branches/pep-0383/Modules/posixmodule.c
==============================================================================
--- python/branches/pep-0383/Modules/posixmodule.c (original)
+++ python/branches/pep-0383/Modules/posixmodule.c Sun May 3 10:01:49 2009
@@ -493,12 +493,14 @@
char *p = strchr(*e, '=');
if (p == NULL)
continue;
- k = PyUnicode_FromStringAndSize(*e, (int)(p-*e));
+ k = PyUnicode_Decode(*e, (int)(p-*e),
+ Py_FileSystemDefaultEncoding, "utf8b");
if (k == NULL) {
PyErr_Clear();
continue;
}
- v = PyUnicode_FromString(p+1);
+ v = PyUnicode_Decode(p+1, strlen(p+1),
+ Py_FileSystemDefaultEncoding, "utf8b");
if (v == NULL) {
PyErr_Clear();
Py_DECREF(k);
More information about the Python-checkins
mailing list