node-gyp: Problem with non-acsii userprofile name on Windows (7)

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.

About this issue

  • Original URL
  • State: closed
  • Created 11 years ago
  • Comments: 16 (6 by maintainers)

Most upvoted comments

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

@MattouFP your “Fix encoding problems in easy_xml.py” (https://github.com/TooTallNate/node-gyp/pull/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 ⁉️