faunski / pyinex

Automatically exported from code.google.com/p/pyinex
0 stars 0 forks source link

.xll file and .py file can't be loaded when the folder contained Chinese characters #1

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
.xll file and .py file can't be loaded when the folder contained Chinese
characters(the default encoding of windows(Chinese version) is cp936
(sys.stdin.encoding)). 

console stdout:

Couldn't get python module D:\Project\ject\oject\ct\ample 
(.\ModuleCache.cpp:Ge
tPyModuleAndFunctionObjects:351)

CreateFile on D:\Project\oject\ct\ample failed: 
系统找不到指定的路径。  
(.\Modu
leCache.cpp:`anonymous-namespace'::ModuleCache::GetModule:115)

I have tested on Chinese version of Windows XP sp3 and Windows 7.

Original issue reported on code.google.com by nirvana...@gmail.com on 3 Aug 2009 at 7:25

GoogleCodeExporter commented 8 years ago
This was tricky to fix; Python is thoroughly broken when it comes to loading 
files in
paths that contain Unicode characters.

I managed to hack a fix in the version that I'm working on now by using Windows 
short
file names. This will only work if your system has them turned on (which most 
systems
do); else I can find no way around the problem.

Next version of Pyinex will be out in a few weeks, and will have the fix.

Original comment by pyinex%t...@gtempaccount.com on 12 Sep 2009 at 1:08