, , "", - :
string convertLineBreaks(String line, String lineBreakYouWant) {
replace all ^M^J or ^M or ^J in line with lineBreakYouWant
return line
}
Edit: I suspect that after reading your question again, you mean how you deal with programs of other nations that cannot handle incorrect (for the target system) line breaks.
I would suggest either 1) use a program that can work, or 2) run your files through a script that finds line breaks of any type and then converts them to any type suitable for your system.
source
share