Menu

#2 New line seperator is hardcoded.

open
nobody
None
5
2009-07-27
2009-07-27
No

When you're reading text as a series of logical lines, you should always look for all three of the major line-separator styles: Windows ("\r\n"), Unix/Linux/OSX ("\n") and pre-OSX Mac ("\r").
My application is deployed on Solaris and Linux servers. Since the utility appends "\n\r" at ht eend of each line, in Linux servers we see ^M characters. This behavior creates problems in my application.
Instead of using ("\n\r") hard-coded, you should use System.getProperty("line.separator") java property.

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.