10 Replies Latest reply: Oct 17, 2012 12:37 AM by EJP RSS

    Want to print new line by reading the string from Database

    836548
      Hi All,

      I am facing a weired problem, When i write below code it is printing it in new line:
       StringBuffer sb = new StringBuffer(1024);
                 sb.append("Hello, \n new line ");
                 System.out.println(" The String is : "+sb.toString());
      If i read the same data from Database (Database CharacterSet is ASCIITHAI ) and appending the string to StringBuffer
      it is print like below one :

      Hello, \n new line.

      want to understand why it is not considering '\n' as newline when reading string from database.