{"id":952,"date":"2017-08-30T10:42:16","date_gmt":"2017-08-30T02:42:16","guid":{"rendered":"http:\/\/blog.wallaceho.com\/?p=952"},"modified":"2017-08-30T10:42:16","modified_gmt":"2017-08-30T02:42:16","slug":"end-of-line-code-on-linux-and-windows","status":"publish","type":"post","link":"https:\/\/blog.wallaceho.com\/?p=952","title":{"rendered":"end-of-line code on linux and windows"},"content":{"rendered":"<p>In Unix and all Unix-like systems, \\n is the code for end-of-line, <span style=\"color: #ff0000;\"><strong>\\r<\/strong><\/span> means nothing special. However\u00a0in Windows (and many old OSs), the code for end of line is 2 characters, <span style=\"color: #ff0000;\"><strong>\\r\\n<\/strong><\/span><\/p>\n<p><span style=\"color: #000000;\">For the file created on any Unix system, the end-of-line code is not work opening via notepad on Windows. Replace the code <strong>\\n<\/strong> to <strong>\\r\\n<\/strong> on notepad++ to solve this problem.<\/span><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-953\" src=\"https:\/\/blog.wallaceho.com\/wp-content\/uploads\/2017\/08\/Untitled-1.png\" alt=\"\" width=\"570\" height=\"360\" srcset=\"https:\/\/blog.wallaceho.com\/wp-content\/uploads\/2017\/08\/Untitled-1.png 570w, https:\/\/blog.wallaceho.com\/wp-content\/uploads\/2017\/08\/Untitled-1-300x189.png 300w\" sizes=\"auto, (max-width: 570px) 100vw, 570px\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In Unix and all Unix-like systems, \\n is the code for end-of-line, \\r means nothing special. However\u00a0in Windows (and many old OSs), the code for end of line is 2 characters, \\r\\n For the file created on any Unix system, &hellip; <a href=\"https:\/\/blog.wallaceho.com\/?p=952\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-952","post","type-post","status-publish","format-standard","hentry","category-computer"],"_links":{"self":[{"href":"https:\/\/blog.wallaceho.com\/index.php?rest_route=\/wp\/v2\/posts\/952","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.wallaceho.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.wallaceho.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.wallaceho.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.wallaceho.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=952"}],"version-history":[{"count":1,"href":"https:\/\/blog.wallaceho.com\/index.php?rest_route=\/wp\/v2\/posts\/952\/revisions"}],"predecessor-version":[{"id":954,"href":"https:\/\/blog.wallaceho.com\/index.php?rest_route=\/wp\/v2\/posts\/952\/revisions\/954"}],"wp:attachment":[{"href":"https:\/\/blog.wallaceho.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=952"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.wallaceho.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=952"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.wallaceho.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=952"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}