Home > Back-end >  Newline character problem
Newline character problem

Time:10-10

Bw=new BufferedWriter (new OutputStreamWriter (new FileOutputStream (strLocalDir. Concat (File. The separator). Concat (fileName. The toString ())), "utf-8"));
If (object instanceof Java. SQL. Date) {
# tmpData. Append (" | | "), append (lsZb. GetTimestamp (I));
} else {
# tmpData. Append (" | | "), append (object);
}
Sb. Append (tmpData. Substring (3). The toString ());
Bw. Write (replaceBlank (sb));
Bw. Write (" \ r \ n ");


File written in the book of the Linux host, the host character set utf-8, newline for ^ M $, why not \ r \ n


CodePudding user response:

Dos2unix filename

CodePudding user response:

Were, in fact, it is only a question of showing \ r \ n
Refer to the following post
https://blog.csdn.net/Jackie_Ryan/article/details/79857890
  • Related