UniCode -- New Line/ Carriage Return

Greetings,

i have a java code which retrieves data from db and does a process.

i am using a \n character in the string returned from the db and passing it to a variable and printing the same.

The problem is that the \n character gets printed as it is.ie., if the string passed is ".....dinesh \n samson ......", it gets printed as ".....dinesh \n samson ......"

but if the same string is hardcoded to a local variable and then printed it works perfectly.. ie., "....dinesh" in a line and "samson ....." in another.

can anyone help me... or give a work around...

thanks in advance.

-- dinesh samson j

[649 byte] By [DineshSamsona] at [2007-10-2 15:25:49]
# 1
Sounds like the database is actually giving you "\" + "n" rather than any kind of newline character.You could always use replaceAll("\\\\n","\n");
malcolmmca at 2007-7-13 14:41:25 > top of Java-index,Java Essentials,Java Programming...
# 2
CROSS POSTED http://forum.java.sun.com/profile.jspa?userID=610280
malcolmmca at 2007-7-13 14:41:25 > top of Java-index,Java Essentials,Java Programming...