Talking about Line Break in mysql Database and Line Break in textarea
- 2021-06-28 14:20:57
- OfStack
1. Line breaks in the mysql database
In the mysql database, the line break isn, char(10), and in python, chr(10)
2. Line breaks in textarea
The newline character in textarea is \rn
3. Line break conversion in web applications
The following is the processing of python django web:
#data Gets data for textarea, including the newline character `rn', following is the transition processing
data = data.replace('\r\n', '\n')
#or data = data.replace ('rn', chr(10))