Encoding problems when writing to the console in node.js

此生再无相见时 提交于 2019-12-25 11:06:12

问题


I'm having problems with the encoding in node.js. I'm running it on windows and for example if I run this simple program:

console.log("trying áéíóú");

I get in the console:

trying ?????

Is this normal? How can I solve this problem?

Thanks


回答1:


The problem is that your console is not capable of handling certain characters the way it is currently configured. Check in the settings and see if you can enable different character sets. You probably want to use Unicode.



来源:https://stackoverflow.com/questions/13735228/encoding-problems-when-writing-to-the-console-in-node-js

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!