node.js - utf8 转 gb2312的问题
PHPz
PHPz 2017-04-17 11:32:17
0
3
614

iconv,iconv-lite等都试过,样例代码总是转出来buffer
还是不很理解,各种锟斤拷。

明确一下需求:
从utf8 字符串 转到 gb2312 字符串

PHPz
PHPz

学习是最好的投资!

reply all(3)
阿神

I was about to talk about iconv-lite... but I was slapped by the original poster...

The converted buffer must be written to a text file for viewing~ JS is unicode, that is to say, the characters in the memory that you want to correctly perform related string operations are all unicode. In this case, there is no conversion Other encodings.

左手右手慢动作

May I ask the poster, what method did you finally use to solve this problem

大家讲道理

How did the original poster solve the problem in the end?

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template