-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
lib: add support for non-eanglish letters in pathes
On Windows 10 i discovered an issue that if there are non-english letters or symbols in path for python find-python.js script can't find it. This bug is couse by encoding issue which I have (i hope) fixed. At least this bug fix works for me. Have changed: modified: gyp/pylib/gyp/easy_xml.py python 2.7 handle xml_string in wrong way becouse of encoding (line 128) modified: gyp/pylib/gyp/input.py if "encoding:utf8" on line 240 doesn't marked cause to error new file: lib/find-python-script.py i have created this file for convience. Script which can handle non-eanglish letters and symbols cann't °fit one lne becouse it is necessary to specify instarctions for several versions of python modified: lib/find-python.js to make js understand python (line 249)
- Loading branch information
1 parent
66c0f04
commit 1fad283
Showing
4 changed files
with
24 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import sys, codecs; | ||
|
||
if (sys.stdout.encoding != "utf-8"): | ||
if (sys.version_info[0] >= 3) and (sys.version_info[1] >= 7): | ||
sys.stdout.reconfigure(encoding='utf-8') | ||
else: | ||
sys.stdout = codecs.getwriter("utf8")(sys.stdout) | ||
|
||
|
||
if (sys.version_info[0] >= 3) and (sys.version_info[1] >= 7): | ||
print(sys.executable) | ||
else: | ||
print(sys.executable.decode("cp1251")); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters