no, the result is right and I can display them in a web page properly. and I want to say that the resultSet is not the same java.sql.ResultSet it is a class I implement it to use Lucene results.
the strange thing is that if I dont use getBytes("UTF-8") the displayed info in result pdf are weird characters but if I specify that line (I mean getBytes("UTF-8") ) in result no string will be displayed and I see a blank space ! Paulo Soares wrote: > > The conversion part is: > > new String(resultSet.getString(ch.getName()).getBytes("UTF-8")) > > I don't see any iText in it. If the DB is well configured > resultSet.getString(ch.getName()) will get you the right text. If it > doesn't > it's not iText fault. > > Paulo > > ----- Original Message ----- > From: "is_maximum" <[EMAIL PROTECTED]> > To: <itext-questions@lists.sourceforge.net> > Sent: Sunday, April 08, 2007 2:15 PM > Subject: [iText-questions] Problem with UTF-8 String and PDF > > >> >> Hi all >> >> I want to create pdf document and my strings encoding are in UTF-8 but >> after >> creating document, the letters are weird. >> Do iText suport utf-8 encoding? >> >> my snippet code is like this: >> Font myfont = FontFactory.getFont("Tahoma", 8, Font.BOLD,Color.BLACK); >> >> PdfPCell cell = new PdfPCell(new Paragraph(new >> String(resultSet.getString(ch.getName()).getBytes("UTF-8")), myfont)); >> >> >> Thank you very much > > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share > your > opinions on IT & business topics through brief surveys-and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > iText-questions mailing list > iText-questions@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/itext-questions > Buy the iText book: http://itext.ugent.be/itext-in-action/ > > -- View this message in context: http://www.nabble.com/Problem-with-UTF-8-String-and-PDF-tf3543453.html#a9898592 Sent from the iText - General mailing list archive at Nabble.com. ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://itext.ugent.be/itext-in-action/