当前位置:网站首页>Record a bug caused by a line break
Record a bug caused by a line break
2022-06-27 00:40:00 【Hua Weiyun】
I'm learning java since , It's worth a lot \n As a newline , Sometimes I see that the line break character in some places is \r\n, I didn't care .
But in a project , I need to request a certificate from an interface , And then put the string of the certificate , Encapsulation head and tail , There is a file .
The certificate is about the following .
What I ask the interface to get is the intermediate string , The first and last lines are added manually .
The code is as follows :
This certificate is crt Format , I still need it openssl Put this crt Certificate conversion p12 certificate .
As a result, when I execute the conversion command , give the result as follows :
Prompt certificate not found , Later, I copied the contents of this certificate to other files , To perform , It can be parsed again .
I can't figure out why , The contents of the two documents are exactly the same , But a certificate can resolve , One can't .
Later, carefully compare the contents of the two certificates , There is still a little difference .
The newline character of a certificate takes up one byte , The other takes up two bytes .
Later, I learned from the information that ,
enter :Carriage Return Use escape characters ’\r’ Express , It's obvious that the 2 The first letter of a word .
Line break :New Line Use escape characters ’\n’ Express , It's obvious that the 1 The first letter of a word .
Windows Inside the system , Each line ends with “< Line break >< enter >”, namely “\n\r”; If you use a new line in the following file \n, There may be unexpected mistakes .
Change the code to :
边栏推荐
- com. fasterxml. jackson. databind. exc.MismatchedInputException: Expected array or string. at [Source:x
- Le principe le plus complet de formation à la précision hybride pour l'ensemble du réseau
- 超硬核!华为智慧屏上的家庭相册竟可以自动精准分类?
- Hit the point! The largest model training collection!
- 深度学习方法求解平均场博弈论问题
- 滑环选型选购时需要注意的技巧
- Com. Faster XML. Jackson. DataBind. Exc.mismatchedinputexception: tableau ou chaîne attendu. At [Source: X
- Alibaba cloud server purchase, basic configuration, (xshell) remote connection and environment building
- Your connection is not private
- com.fasterxml.jackson.databind.exc.MismatchedInputException: Expected array or string. at [Source:x
猜你喜欢

An article takes you to learn container escape

When transformer encounters partial differential equation solution

05 | standard design (Part 2): how to standardize the different styles of commit information, which are difficult to read?

Batch generate folders based on file names

MATLAB data type - character type

com.fasterxml.jackson.databind.exc.MismatchedInputException: Expected array or string. at [Source:x

Installation of xshell and xftp

Can't write to avoid killing and can easily go online CS through defender

剑指 Offer 10- II. 青蛙跳台阶问题

Is there anyone who doesn't know the three cores of concurrent programming?
随机推荐
Network in network (dolls)
Moher College -x-forwarded-for injection vulnerability practice
The most complete hybrid precision training principle in the whole network
简单快速的数网络(网络中的网络套娃)
根据文件名批量生成文件夹
Ten thousand words explanation - mindarmour Xiaobai tutorial!
[vscade] preview MD file
Is it reliable to speculate in stocks by mobile phone? Is it safe to open an account and speculate in stocks online
idea 热启动失效解决方案
CPU的异常处理
05 | standard design (Part 2): how to standardize the different styles of commit information, which are difficult to read?
[micro service]nacos
How to easily describe the process of machine learning?
com.fasterxml.jackson.databind.exc.MismatchedInputException: Expected array or string. at [Source:x
数字格式化的 js 库
Can I open an account for stock trading on my mobile phone? Is it safe to open an account for stock trading on the Internet
股票怎样在手机上开户安全吗 网上开户炒股安全吗
Is it safe to buy pension insurance online? Is there a policy?
1+1<2 ?! HESIC论文解读
Can I open an account for stock trading on my mobile phone? Is it safe to open an account for stock trading on the Internet