windows字符CR LF

在windows上:\n will write 0x0D 0x0A
在unix上: \r will write 0x0D \nwill write0x0A`

  • \r is 0x0D (^M)  是回车
  • \n is 0x0A (^J)  是换行符

各系统换行符:

操作系统 表示下一行方法
DOS/Windows 回车+换行CR/LF 或:\r\n
UNIX/Linux 换行LF 或:\n
MAC OS 回车CR 或:\r

 

 

 

 

 


其中:

  • CR:Carriage Return
  • LF:Line Feed
posted @ 2022-02-23 12:51  Brickert  Views(159)  Comments(0)    收藏  举报