当前位置:网站首页>【字符集九】gbk拷贝到Unicode会乱码?
【字符集九】gbk拷贝到Unicode会乱码?
2022-06-12 08:42:00 【junxuezheng】
一、问题描述
- 产品遇到了一个bug,一个同事说,可能由于他的字符是其他地方拷贝的,并不是所需格式的,所以产生了乱码。
二、问题分析
- 简单说,就是你把gbk拷贝到了utf8格式,所以乱码了。
- 但事实真的是这样的吗?
三、实验
1、新建一个gbk格式的文件
2、新建一个utf8格式的文件
3、把gbk格式的文字拷贝到utf8格式的文本中
4、把utf8格式的文件保存,再打开。发现没有乱码。
(如上图)
备注:当然,如果我们把gbk另存为utf8,打开gbk,是会乱码的。
四、结果分析
- 之前的说法,我把gbk格式拷贝到了utf8格式的文档中,(或者是拷贝到某个输入中),导致乱码的说法是不存在的。
- gbk文字拷贝到utf8格式的文件中,Windows系统应该做了转码的操作。
边栏推荐
- Shell基本语法--算数运算
- Hands on deep learning 18 -- model selection + over fitting and under fitting and code implementation
- 【新规划】
- Record the first step pit of date type
- Scope of bean
- At present, MES is widely used. Why are there few APS scheduling systems? Why?
- Seurat package addmodulescore is used for bulk RNA SEQ data
- Judge whether the object is empty
- About weights exercise
- The newline character with in the string is converted to an array
猜你喜欢

Hands on deep learning -- activation function and code implementation of multi-layer perceptron

Background location case II

Hands on deep learning -- discarding method and its code implementation

About weights exercise

ctfshow web 1-2

Background attribute compound writing

Py & go programming skills: logic control to avoid if else

(p15-p16) optimization of the right angle bracket of the template and the default template parameters of the function template
![[advanced pointer III] implement C language quick sorting function qsort & callback function](/img/f0/3729db83ba3eb15c7df0958858ece9.png)
[advanced pointer III] implement C language quick sorting function qsort & callback function

Ankerui motor protector has the functions of overload inverse time limit, overload definite time limit, grounding, starting timeout, leakage, underload, phase failure, locked rotor, etc
随机推荐
Regular expressions in JS
Random acquisition of 4-digit non repeated verification code
余压监控系统保证火灾发生时消防疏散通道的通畅,为大型高层建筑的安全运行和人民生命财产安全保驾护航
js实现页面加载后再刷新一次
2022.6.11-----leetcode. nine hundred and twenty-six
The residual pressure monitoring system ensures the smoothness of the fire evacuation passage in case of fire, and protects the safe operation of large high-rise buildings and the safety of people's l
What should be paid attention to when establishing MES system? What benefits can it bring to the enterprise?
Engineers learn music theory (III) interval mode and chord
Principle and configuration of MPLS
Encapsulate the amount input box component.
Background fixing effect
Background color translucent
Calling stored procedures in mysql, definition of variables,
Hands on deep learning -- implementation of multi-layer perceptron from scratch and its concise implementation
动态线段树leetcode.699
Is it really expensive for enterprises to launch MES software?
Get last month, current time and next month
【进阶指针二】数组传参&指针传参&函数指针&函数指针数组&回调函数
MSTP的配置与原理
Hands on learning and deep learning -- simple implementation of linear regression