Influence of carriage return and line feed on Readline

Source: Internet
Author: User
Cr: carriage return: return the front of the typewriter. Corresponding \ RLF: line feed, typewriter rolling down a line. corresponding to the \ n typewriter era, these are instructions for directing typewriter mechanical work, the computer era is only displayed on the screen. Cr + LF is a standard line break for text files in windows. It is written as \ r \ n in C language.
<CR> the ASCII value is 13 in decimal format and 0x0d in hexadecimal format.
<LF> the ASCII value is 10 in decimal format, and the hexadecimal value is 0x0a.
The original carriage return (CR) and line feed (LF) are used to represent the next line. There are three different usage: DOS and Windows use carriage return + line feed (CR + LF) to represent the next line, and Unix uses line feed (LF) to represent the next line, the Mac machine uses the carriage return (CR) to represent the next line.
If a cell in a CSV file contains a line feed, it will automatically add "" at the beginning and end. Therefore, when you use CSV to access data and read data by row, problems may occur, because Readline uses line breaks or carriage returns as the marker of the next line. I can't find the problem when I open it in Notepad. I can see it at a Glance using notepad or ultraedit.


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.