utf8 problem in _third_party_main.js

  • Version: 7.1 ... 7.4
  • Platform: 4.4.0-57-generic Mani #78-Ubuntu SMP Fri Dec 9 23:50:32 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
  • Subsystem:

Since version 7.1 (node.js) there is a problem with utf8 chars, but only when you put your code into the file lib/_third_party_main.js (this path has to be included in node.gyp)

let say _third_party_main.js looks like this

(function () {
"use strict";
console.log("pchnąć w tę łódź jeża lub ośm skrzyń fig"); //some polish words
}());

if you then run simple ./configure and make

and after long successful process of compilation you will just invoke ./node

then you will get

pchn�� w t� �ódź jeża lub o�m skrzy� fig

utf8 has been destroyed