Language
NSK.ico

NetSkateKoban Enterprise FAQ

Category
2. Function, Operation
FAQ Number
2-51
Q
When importing information using a CSV file, how should CR, LF, or CR+LF characters, which represent line breaks, be written if I want to include them in an information field (column)?
A

In the CSV files imported by NetSkateKoban, special characters such as CR (0x0d), LF (0x0a), and CR+LF (0x0d 0x0a), which represent line breaks, are interpreted as line‑ending codes of the CSV file.

When writing these special characters as information within a field, write CR as \r and LF as \n.

Strings written as \n or \r within an information field are registered in the Koban database (DB) as the following strings:

 

CSV file String stored in the DB
\n \n
\r \r
\r\n \n (※ Convert it to \n and register it.)
\n\r \n\r

 

Also, if you want to display the two characters \n as text, write \\n; and if you want to display the two characters \r as text, write \\r. By doing so, the strings \n and \r will appear as text on the Koban Console screen.

Example 1)

When writing the following three lines,

"1st line
2nd line
3rd line"

Write the following string in the information field.

"1st line\n2nd line\n3rd line"

Example 2)

When writing the following single line,

"\r represents the CR (0x0d) character, and \n represents the LF (0x0a) character."

Write the following string in the information field.

"\\r represents the CR (0x0d) character, and \\n represents the LF (0x0a) character."