当前位置:网站首页>【字符集九】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系统应该做了转码的操作。
边栏推荐
- Centso8 installing mysql8.0 (Part 2)
- Shell基本语法--算数运算
- The Three Kingdoms kill the surrounding areas -------- explanation of the pig Kingdom kill problem
- When converting tensor to ndarray in tensorflow, the run or Eval function is constantly called in the loop, and the code runs more and more slowly!
- Scope of bean
- js实现页面加载后再刷新一次
- 动态创建表单并提交
- Dynamic segment tree leetcode six hundred and ninety-nine
- Webrtc adding third-party libraries
- Composition of box model
猜你喜欢

IDEA新版UI申请方法+无测试资格使用方法及相关介绍

Webrtc series - mobile terminal hardware coding supports simulcast

Oracle installation details (verification)

Hands on deep learning -- weight decay and code implementation

Background color translucent

Close asymmetric key

(p15-p16) optimization of the right angle bracket of the template and the default template parameters of the function template

报错:清除网站内搜索框中的历史记录?

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

处理异常数据
随机推荐
[essence] explain in detail the memory management mechanism in QT
About weights exercise
Hands on deep learning 18 -- model selection + over fitting and under fitting and code implementation
Py & go programming skills: logic control to avoid if else
FDA审查人员称Moderna COVID疫苗对5岁以下儿童安全有效
Only use MES as a tool? Looks like you missed the most important thing
At present, MES is widely used. Why are there few APS scheduling systems? Why?
Handling abnormal data
《MATLAB 神经网络43个案例分析》:第8章 GRNN网络的预测----基于广义回归神经网络的货运量预测
R loop assignment variable name
Background color translucent
Wechat applet image saving function
Knee joint
[compilation principle] understand BNF
Database foundation -- normalization and relational schema
Dynamic segment tree leetcode six hundred and ninety-nine
2022.6.11-----leetcode.926
The era of post MES system has come gradually
[new planning]
(p19-p20) delegate constructor (proxy constructor) and inheritance constructor (using)