This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: load pyc file with mbcs file system in update_compiled_module
Type: compile error Stage:
Components: Windows Versions: Python 3.0
process
Status: closed Resolution: duplicate
Dependencies: Superseder: 3.0.1 crashes in unicode path
View: 5273
Assigned To: Nosy List: joexo, ocean-city
Priority: normal Keywords:

Created on 2009-03-05 12:14 by joexo, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (4)
msg83190 - (view) Author: 徐洲 (joexo) Date: 2009-03-05 12:14
py3k 3.01

static int
update_compiled_module(PyCodeObject *co, char *pathname)
{
	PyObject *oldname, *newname;

	if (!PyUnicode_CompareWithASCIIString(co->co_filename, 
pathname))
		return 0;

/* string pathname related with FILE SYSTEM !!! 
 * old code is :
 * newname = PyUnicode_FromString(pathname); 
 */
	newname = PyUnicode_DecodeFSDefault(pathname);
	if (newname == NULL)
		return -1;

	oldname = co->co_filename;
	Py_INCREF(oldname);
	update_code_filenames(co, oldname, newname);
	Py_DECREF(oldname);
	Py_DECREF(newname);
	return 1;
}
msg83191 - (view) Author: 徐洲 (joexo) Date: 2009-03-05 12:22
if directory have chinese word under windows system
load .py is passed
load .pyc get the utf-8 codec error...

i modified this code
wish this is helpful...
msg83192 - (view) Author: Hirokazu Yamamoto (ocean-city) * (Python committer) Date: 2009-03-05 12:42
I believe this issue is duplicate of issue5273, and fixed yesterday. Can
you try latest svn checkout?
msg83196 - (view) Author: 徐洲 (joexo) Date: 2009-03-05 13:42
Oh... yes
this is fixed
thx a lot for u check out
History
Date User Action Args
2022-04-11 14:56:46adminsetgithub: 49672
2009-03-05 13:47:12ocean-citysetdependencies: - 3.0.1 crashes in unicode path
superseder: 3.0.1 crashes in unicode path
2009-03-05 13:46:30ocean-citysetstatus: open -> closed
dependencies: + 3.0.1 crashes in unicode path
resolution: duplicate
2009-03-05 13:42:19joexosetmessages: + msg83196
2009-03-05 12:42:53ocean-citysetnosy: + ocean-city
messages: + msg83192
2009-03-05 12:22:49joexosetmessages: + msg83191
2009-03-05 12:14:36joexocreate