New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with non-acsii userprofile name on Windows (7) #297

Closed
danyaPostfactum opened this Issue Jul 26, 2013 · 15 comments

Comments

Projects
None yet
9 participants
@danyaPostfactum

danyaPostfactum commented Jul 26, 2013

Problem with .vcxproj file. node-gyp writes it in system codepage (non-utf8), while xml prolog specifies utf-8 in encoding attribute. This causes error while trying to build the project.
My userprofile contains cyrillic characters, so I get non-ACSII characters in paths.

@jfhenriques

This comment has been minimized.

Show comment
Hide comment
@jfhenriques

jfhenriques Nov 14, 2013

Contributor

Why didn't this got any attention? This is an important issue. I cannot use node-gyp because my name is João, and I'm not going to create another user just for compiling purposes...

Contributor

jfhenriques commented Nov 14, 2013

Why didn't this got any attention? This is an important issue. I cannot use node-gyp because my name is João, and I'm not going to create another user just for compiling purposes...

@danyaPostfactum

This comment has been minimized.

Show comment
Hide comment
@danyaPostfactum

danyaPostfactum Nov 14, 2013

...and I'm not going to create another user...

I did (because of too often similar issues) :) But of course , this is very bad solution..

danyaPostfactum commented Nov 14, 2013

...and I'm not going to create another user...

I did (because of too often similar issues) :) But of course , this is very bad solution..

@jfhenriques

This comment has been minimized.

Show comment
Hide comment
@jfhenriques

jfhenriques Nov 14, 2013

Contributor

I was refering that its not pratical to change users each time I need to update or install a package that needs node-gyp. I ended up copying the .node-gyp directory created in my home dir to other place and passed the --nodedir flag. Of course it will not work with npm install, but its better than keep changing users.

Contributor

jfhenriques commented Nov 14, 2013

I was refering that its not pratical to change users each time I need to update or install a package that needs node-gyp. I ended up copying the .node-gyp directory created in my home dir to other place and passed the --nodedir flag. Of course it will not work with npm install, but its better than keep changing users.

@JayBeavers

This comment has been minimized.

Show comment
Hide comment
@JayBeavers

JayBeavers Dec 10, 2013

Collaborator

One of the beauties of open source is if the problem really annoys you, you are fully empowered to fix it!

There's a lot of work needed to fix issues in node-gyp, so I'm not personally going to be able to investigate this in the near future. Could one of you do the investigation, make a fix, and submit a pull request? @danyaPostfactum @jfhenriques

Collaborator

JayBeavers commented Dec 10, 2013

One of the beauties of open source is if the problem really annoys you, you are fully empowered to fix it!

There's a lot of work needed to fix issues in node-gyp, so I'm not personally going to be able to investigate this in the near future. Could one of you do the investigation, make a fix, and submit a pull request? @danyaPostfactum @jfhenriques

@jfhenriques

This comment has been minimized.

Show comment
Hide comment
@jfhenriques

jfhenriques Dec 12, 2013

Contributor

Hy @JayBeavers I submited a pull request that still needs some work.

At least now it works for me, but it might break for others.

Please take a look at #366

Contributor

jfhenriques commented Dec 12, 2013

Hy @JayBeavers I submited a pull request that still needs some work.

At least now it works for me, but it might break for others.

Please take a look at #366

@JayBeavers

This comment has been minimized.

Show comment
Hide comment
@JayBeavers

JayBeavers Apr 4, 2014

Collaborator

@jfhenriques, your patch is in gyp itself. node-gyp copies gyp from a separate repository, stored here: https://code.google.com/p/gyp/

Please submit your issue in their repository: https://code.google.com/p/gyp/issues/list
Then submit your patch using the process documented here: https://code.google.com/p/gyp/wiki/GypHacking

Then please come back here when your patch is integrated with gyp and we will update our code. This process takes a while because node-gyp is copied into npm and npm is copied into nodejs and gyp is also copied independently into nodejs directly, so lots of refreshes need to be made before a fix to gyp takes effect.

Collaborator

JayBeavers commented Apr 4, 2014

@jfhenriques, your patch is in gyp itself. node-gyp copies gyp from a separate repository, stored here: https://code.google.com/p/gyp/

Please submit your issue in their repository: https://code.google.com/p/gyp/issues/list
Then submit your patch using the process documented here: https://code.google.com/p/gyp/wiki/GypHacking

Then please come back here when your patch is integrated with gyp and we will update our code. This process takes a while because node-gyp is copied into npm and npm is copied into nodejs and gyp is also copied independently into nodejs directly, so lots of refreshes need to be made before a fix to gyp takes effect.

@polkovnikov-ph

This comment has been minimized.

Show comment
Hide comment
@polkovnikov-ph

polkovnikov-ph Jun 11, 2014

It's 2014. There's still no Unicode support in node-gyp. That's hilarious.

polkovnikov-ph commented Jun 11, 2014

It's 2014. There's still no Unicode support in node-gyp. That's hilarious.

@jfhenriques

This comment has been minimized.

Show comment
Hide comment
@jfhenriques

jfhenriques Jun 28, 2014

Contributor

For those who are still waiting for this to be fixed, take a look at the solution I posted here:
#366 (comment)

Contributor

jfhenriques commented Jun 28, 2014

For those who are still waiting for this to be fixed, take a look at the solution I posted here:
#366 (comment)

@wizzard0

This comment has been minimized.

Show comment
Hide comment
@wizzard0

wizzard0 Sep 9, 2014

I second the need for the patch.

wizzard0 commented Sep 9, 2014

I second the need for the patch.

@myrises

This comment has been minimized.

Show comment
Hide comment
@myrises

myrises Mar 10, 2015

@MattouFP
your "Fix encoding problems in easy_xml.py" (#554):

+ # Fix encoding
+ xml_string = unicode(xml_string, 'latin-1').encode(encoding)

is not working with cyrillic symbols 😞
for correct work in this case 🇷🇺 need another patch:

+ # Fix encoding for cyrillc symbols
+ xml_string = unicode(xml_string, 'Windows-1251').encode(encoding)

This is not good solution in whole. Need a change solution provider maybe ⁉️

myrises commented Mar 10, 2015

@MattouFP
your "Fix encoding problems in easy_xml.py" (#554):

+ # Fix encoding
+ xml_string = unicode(xml_string, 'latin-1').encode(encoding)

is not working with cyrillic symbols 😞
for correct work in this case 🇷🇺 need another patch:

+ # Fix encoding for cyrillc symbols
+ xml_string = unicode(xml_string, 'Windows-1251').encode(encoding)

This is not good solution in whole. Need a change solution provider maybe ⁉️

@Sogl

This comment has been minimized.

Show comment
Hide comment
@Sogl

Sogl Apr 30, 2015

@knyazhe1, It not helps me...=(
Windows 8.1 x64, VS 2013 sp4, Russian language in username

Can't install loopback:
http://loopback.io/getting-started/

Output:

C:\Users\Артем\AppData\Roaming\npm\node_modules\strongloop\node_modules\strong-s
upervisor\node_modules\heapdump>if not defined npm_config_node_gyp (node "C:\nod
ejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.
js" rebuild )  else (rebuild)
Сборка проектов в этом решении по одному. Чтобы включить параллельную сборку, до
бавьте параметр "/m".
C:\Users\Артем\AppData\Roaming\npm\node_modules\strongloop\node_modules\strong-
supervisor\node_modules\heapdump\build\addon.vcxproj(47,46): error MSB4025: не
удалось загрузить файл проекта. Недопустимый знак для указанной кодировки., стр
ока 47, позиция 46.
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\12.0\bin\msbuild.exe` fail
ed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (C:\nodejs\node_modules\npm\node_modul
es\node-gyp\lib\build.js:269:23)
gyp ERR! stack     at ChildProcess.emit (events.js:110:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:1074
:12)
gyp ERR! System Windows_NT 6.3.9600
gyp ERR! command "node" "C:\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\
bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\Артем\AppData\Roaming\npm\node_modules\strongloop\node_mod
ules\strong-supervisor\node_modules\heapdump
gyp ERR! node -v v0.12.2
gyp ERR! node-gyp -v v1.0.3
gyp ERR! not ok
\

I'm from this issue #404

Sogl commented Apr 30, 2015

@knyazhe1, It not helps me...=(
Windows 8.1 x64, VS 2013 sp4, Russian language in username

Can't install loopback:
http://loopback.io/getting-started/

Output:

C:\Users\Артем\AppData\Roaming\npm\node_modules\strongloop\node_modules\strong-s
upervisor\node_modules\heapdump>if not defined npm_config_node_gyp (node "C:\nod
ejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.
js" rebuild )  else (rebuild)
Сборка проектов в этом решении по одному. Чтобы включить параллельную сборку, до
бавьте параметр "/m".
C:\Users\Артем\AppData\Roaming\npm\node_modules\strongloop\node_modules\strong-
supervisor\node_modules\heapdump\build\addon.vcxproj(47,46): error MSB4025: не
удалось загрузить файл проекта. Недопустимый знак для указанной кодировки., стр
ока 47, позиция 46.
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\12.0\bin\msbuild.exe` fail
ed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (C:\nodejs\node_modules\npm\node_modul
es\node-gyp\lib\build.js:269:23)
gyp ERR! stack     at ChildProcess.emit (events.js:110:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:1074
:12)
gyp ERR! System Windows_NT 6.3.9600
gyp ERR! command "node" "C:\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\
bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\Артем\AppData\Roaming\npm\node_modules\strongloop\node_mod
ules\strong-supervisor\node_modules\heapdump
gyp ERR! node -v v0.12.2
gyp ERR! node-gyp -v v1.0.3
gyp ERR! not ok
\

I'm from this issue #404

@Sogl

This comment has been minimized.

Show comment
Hide comment
@Sogl

Sogl Apr 30, 2015

Finally fixed!
@MattouFP, @knyazhe1, thx for the solution!

My problem was in editing of the wrong file - easy_xml.py on Roaming folder (-g flag in install), but packet file runs node-gyp in Node.js installation directory.

Sogl commented Apr 30, 2015

Finally fixed!
@MattouFP, @knyazhe1, thx for the solution!

My problem was in editing of the wrong file - easy_xml.py on Roaming folder (-g flag in install), but packet file runs node-gyp in Node.js installation directory.

@Chudesnov

This comment has been minimized.

Show comment
Hide comment
@Chudesnov

Chudesnov Jul 20, 2015

I believe this issue has to be re-opened.

Unfortunately, the fix provided in 39a06bc affects only Western (Latin-1) releases of Windows, as Cyrillic, Greek, Turkish, Hebrew, Arabic, Baltic and Vietnamese releases use different ANSI code pages.

There is, fortunately, a universal WinAPI method (available on Windows 2000 or higher) for detecting the default ANSI code page, GetACP(), used internally by the locale Python package. Using locale.getdefaultlocale()[1] instead of "Latin-1" fixes this issue on Cyrillic (Russian) Windows 8.1.

Chudesnov commented Jul 20, 2015

I believe this issue has to be re-opened.

Unfortunately, the fix provided in 39a06bc affects only Western (Latin-1) releases of Windows, as Cyrillic, Greek, Turkish, Hebrew, Arabic, Baltic and Vietnamese releases use different ANSI code pages.

There is, fortunately, a universal WinAPI method (available on Windows 2000 or higher) for detecting the default ANSI code page, GetACP(), used internally by the locale Python package. Using locale.getdefaultlocale()[1] instead of "Latin-1" fixes this issue on Cyrillic (Russian) Windows 8.1.

@polkovnikov-ph

This comment has been minimized.

Show comment
Hide comment
@polkovnikov-ph

polkovnikov-ph Jul 21, 2015

@Chudesnov Could you make it into a pull request, please? As it is obvious from the existence of this issue, Nathan doesn't have required skills to support this project. Even with such a deep detail on implementation it's quite unlikely this issue will get fixed.

polkovnikov-ph commented Jul 21, 2015

@Chudesnov Could you make it into a pull request, please? As it is obvious from the existence of this issue, Nathan doesn't have required skills to support this project. Even with such a deep detail on implementation it's quite unlikely this issue will get fixed.

@roman-yerin

This comment has been minimized.

Show comment
Hide comment
@roman-yerin

roman-yerin May 27, 2016

Still valid. Merge #945 to fix it please

roman-yerin commented May 27, 2016

Still valid. Merge #945 to fix it please

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment