How to transcode obscure Chinese characters?

after transcoding at the backend, there will be problems in the return frontend

.

do these words come with ""?

Oct.22,2021

obscure words change to GB2312.


GBK itself can not correctly represent many characters, of course, can only be used? Instead.
although GBK has a capacity of more than 20000 characters, it can only be used for words that are not in the font. Replace.

Transcoding is actually looking up the table, and since there is no corresponding table, there is nothing anyone can do about it.


the backend uses iconv for conversion. Is there any corresponding relationship between inlen and outlen?

now I'm using UTF8 conversion GB18030,inlen equals outlen

but some extra characters will be created out of thin air after conversion.

for example, if you convert UTF-8 's {"event": "login", "user": "qualified customers"}
to GB18030, then it will become {"event": "login", "user": "qualified customers"} []

.

the json data was originally transmitted, but the format is not correct after the conversion.

Menu