当前位置:网站首页>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 :
边栏推荐
- Introduction to message queuing
- Concepts de base de données Oracle
- Redis detailed tutorial
- Hit the point! The largest model training collection!
- JS library for number formatting
- Oracle 數據庫基本知識概念
- The most complete hybrid precision training principle in the whole network
- Deep learning method for solving mean field game theory problems
- 滑环选型选购时需要注意的技巧
- [microservices] understanding microservices
猜你喜欢
CPU的异常处理
Pet hospital management system based on SSMP
The [MySQL] time field is set to the current time by default
Kubeadm create kubernetes cluster
【Vscode】预览md文件
Mindspire, a domestic framework, cooperates with Shanshui nature conservation center to find and protect the treasure life in the "China water tower"
com.fasterxml.jackson.databind.exc.MismatchedInputException: Expected array or string. at [Source:x
當Transformer遇見偏微分方程求解
Com. Faster XML. Jackson. DataBind. Exc.mismatchedinputexception: tableau ou chaîne attendu. At [Source: X
Analysis on the advantages and disadvantages of the best 12 project management systems at home and abroad
随机推荐
泰国安全又划算的支付方式
目标追踪拍摄?目标遮挡拍摄?拥有19亿安装量的花瓣app,究竟有什么别出心裁的功能如此吸引用户?
Hit the point! The largest model training collection!
How to write test cases and a brief introduction to go unit test tool testify
Using physical information neural network to solve hydrodynamics equations
[微服务]认识微服务
Introduction to message queuing
Outside the code: writing is the best way to force growth
Alibaba cloud server purchase, basic configuration, (xshell) remote connection and environment building
能在手机上开户炒股吗 网上开户炒股安全吗
高清滑环生产过程当中的质量如何把控
大健康行业年度必参盛会,2022山东国际大健康产业博览会
Safe and cost-effective payment in Thailand
超硬核!华为智慧屏上的家庭相册竟可以自动精准分类?
Com. Faster XML. Jackson. DataBind. Exc.mismatchedinputexception: tableau ou chaîne attendu. At [Source: X
手机炒股靠谱吗 网上开户炒股安全吗
Kubernetes visual interface dashboard
idea 热启动失效解决方案
深度学习方法求解平均场博弈论问题
Overview of Freescale MCU