Serhiy Storchaka added the comment:

I want to get this too, but perhaps there are some issues in a code.

1. Py_GetPrefix() returns wchar_t* string with maximal length MAXPATHLEN 
(defined in Include/osdefs.h as 256 on Windows). Then wcstombs() converts it to 
char* string. Are you sure that MAX_PATH (defined as 260 on Windows) is enough 
for converted string? I afraid that for multi-byte encoding it can be 
2*MAXPATHLEN or even 3*MAXPATHLEN bytes.

2. After converting _tcl_library contains a path in locale encoding. And 
_putenv() works with it. I'm not sure, but I afraid that Tcl_SetVar() can 
expect UTF-8 encoded string. Please test with prefix containing non-ASCII 
characters (or even better with prefix containing East-Asian characters on 
East-Asian Windows).

----------
nosy: +haypo, scoder

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue20035>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to