node.js to c# 中文乱码解决

C#读取node.js控制台中文:

node.js端:(中文转unicode)

function enunicode(code){
code=code.replace(/[\u00FF-\uFFFF]/g,function($0){
return ‘\\u’+$0.charCodeAt().toString(16);
});
return code;
}

var out=’………’;
console.log(enunicode(out));

c#端:

Regex.Unescape(result);

 

Article By :

3 thoughts on “node.js to c# 中文乱码解决

  1. Great beat ! I wish to apprentice whilst you amend your website, how could i subscribe for a weblog web site? The account helped me a acceptable deal. I had been tiny bit familiar of this your broadcast offered bright clear concept

回复 sverigapotek 取消回复

您的邮箱地址不会被公开。 必填项已用 * 标注