当前位置:网站首页>[character set 9] will GBK be garbled when copied to unicode?

[character set 9] will GBK be garbled when copied to unicode?

2022-06-12 08:52:00 junxuezheng

One 、 Problem description

  • The product encountered a bug, A colleague said , Probably because his characters were copied from other places , Not in the required format , So there's a mess .

Two 、 Problem analysis

  • In short , It's you gbk Copy to utf8 Format , So it's garbled .
  • But is that really the case ?

3、 ... and 、 experiment

1、 Create a new one gbk File format
 Insert picture description here

2、 Create a new one utf8 File format
 Insert picture description here

3、 hold gbk Copy formatted text to utf8 In formatted text
 Insert picture description here

4、 hold utf8 Format file save , And on again . No garbled code found .
( Pictured above )

remarks : Of course , If we put gbk Save as utf8, open gbk, It's messy .

Four 、 Result analysis

  • Previous statement , I put gbk The format is copied to utf8 In a document in format ,( Or copy it to some input ), There is no such thing as garbled code .
  • gbk Copy text to utf8 Format file ,Windows The system should have transcoded .
原网站

版权声明
本文为[junxuezheng]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/163/202206120842241257.html