S
Stefan Ram
When writing into a Unicode text file, given that the Stream
encoding was set to »UTF-8«, what is the proper, best or
canonical way to terminate a line?
Some possibilities are given on the following lines.
printStream.printf( "\n" );
printStream.printf( "%n" );
printStream.print(( char )0x000A );
printStream.print(( char )0x000D );
printStream.print(( char )0x000D ); printStream.print(( char )0x000A );
printStream.print(( char )0x0085 ); // 0x0085 is Unicode »NEL - next line«
printStream.print(( char )0x2028 ); // 0x2028 is Unicode »line separator«
encoding was set to »UTF-8«, what is the proper, best or
canonical way to terminate a line?
Some possibilities are given on the following lines.
printStream.printf( "\n" );
printStream.printf( "%n" );
printStream.print(( char )0x000A );
printStream.print(( char )0x000D );
printStream.print(( char )0x000D ); printStream.print(( char )0x000A );
printStream.print(( char )0x0085 ); // 0x0085 is Unicode »NEL - next line«
printStream.print(( char )0x2028 ); // 0x2028 is Unicode »line separator«