Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

The stacktrace output encoding is not correct on windows. #7387

Closed
heroboy opened this issue Apr 1, 2014 · 1 comment
Closed

The stacktrace output encoding is not correct on windows. #7387

heroboy opened this issue Apr 1, 2014 · 1 comment
Labels

Comments

@heroboy
Copy link

heroboy commented Apr 1, 2014

Save a file with the code in utf8 encoding:

console.log("测试abc");
throw new Error("测试abc");

and this is the output:


D:\>node a.js
测试abc

D:\a.js:2
throw new Error("娴嬭瘯abc");
      ^
Error: 娴嬭瘯abc
    at Object.<anonymous> (D:\a.js:2:7)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Function.Module.runMain (module.js:497:10)
    at startup (node.js:119:16)
    at node.js:901:3

D:\>node -v
v0.10.22

I will see the console.log output is correct, but the error message is not.

But if I type throw new Error("测试abc") in REPL. The ouput is correct.

@jasnell jasnell added the windows label Jun 3, 2015
@heroboy
Copy link
Author

heroboy commented Jul 9, 2015

test this in v0.12.1, the problem still exists.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants