当前位置:网站首页>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 :
边栏推荐
- [test] the content of the hottest test development learning route has been updated again to help pass the customs and open the test of large factories
- 墨者学院-SQL注入漏洞测试(报错盲注)
- find_ Detailed use guide of CIRC
- Oracle 数据库基本知识概念
- 技术干货|什么是大模型?超大模型?Foundation Model?
- Lwip之定时机制
- 技术干货|极速、极智、极简的昇思MindSpore Lite:助力华为Watch更加智能
- Super hard core! Can the family photo album on Huawei's smart screen be classified automatically and accurately?
- My advanced learning notes of C language ----- keywords
- 2022 Health Expo, Shandong health care exhibition, postpartum health and sleep health exhibition
猜你喜欢

新型冠状病毒变异Delta毒株的模拟(MindSPONGE应用)

Network in network (dolls)

Memorizing byte order of big and small end

根据文件名批量生成文件夹

Understanding of "the eigenvectors corresponding to different eigenvalues cannot be orthogonalized"

论文学习——降雨场次划分方法对降雨控制率的影响分析

如何通俗易懂的描述机器学习的流程?

墨者学院-SQL注入漏洞测试(报错盲注)

冲刺强基计划数学物理专题二

1+1<2 ?! HESIC论文解读
随机推荐
Why does EDR need defense in depth to combat ransomware?
Intrusion trace cleaning
05 | 規範設計(下):commit 信息風格迥异、難以閱讀,如何規範?
我的c语言进阶学习笔记 ----- 关键字
[test] the content of the hottest test development learning route has been updated again to help pass the customs and open the test of large factories
国内外最好的12款项目管理系统优劣势分析
Le principe le plus complet de formation à la précision hybride pour l'ensemble du réseau
In the Internet industry, there are many certificates with high gold content. How many do you have?
消息队列简介
matlab数据类型 —— 字符型
Ten thousand words explanation - mindarmour Xiaobai tutorial!
根据文件名批量生成文件夹
[microservice]eureka
The fourth bullet of redis interview eight part essay (end)
手机上可以开户炒股吗 网上开户炒股安全吗
redis详细教程
全網最全的混合精度訓練原理
Is it reliable to speculate in stocks by mobile phone? Is it safe to open an account and speculate in stocks online
當Transformer遇見偏微分方程求解
Freescale 单片机概述