I think this is a standard problem, which may have been asked before, but I could not get an exact answer, so I'm sending a question.
The problem is that our server is running in a Linux window. We access the server through a browser in the window window to enter data in a field that should contain several lines that the user can enter by pressing the enter key after each line the alphabet GC Protection
When this input field (this is a text area) is read on a linux machine, we want to split the data based on the new line character.
I had three questions.
Input contains "\ r \ n" or "\ n"
If the input contains "\ r \ n", the linux line.separator property (vm property) will not work for me, as it says "\ n" and therefore can leave "\ r" in the data.
If "\ r" is left in the data, if I open the file on a Windows machine, does that mean a newline?
Finally, can anyone tell me a standard way to deal with this problem?
source
share