Thread: Problem With Euro character
Hello
I'm working on a french web application (Spring+Ibatis+Postgre).
My PostgreSql version : 8.1
My db encoding is UTF-8.
My JDBc Driver version is 8.1-405-jdbc3
There is no problem to display the Euro (€) character in HTML pages, but in the PDF this caracter disepear !!!
Strange...
I've done a little test, this is the recuperation of a String "€ € € € € Euro € Euro € € € €" :
log.info(c.getObservation());
log.info(new String (c.getObservation().getBytes("UTF-8")));
log.info(new String (c.getObservation().getBytes("ISO-8859-1")));
INFO 17:49:10.468 ? ? ? ? ? Euro ? Euro ? ? ? ? (TestEuro.java:14)
INFO 17:49:10.468 € € € € € Euro € Euro € € € € (TestEuro.java:15)
INFO 17:49:10.468 € € € € € Euro € Euro € € € € (TestEuro.java:16)
Very strange, it seems that my observation have an encoding ISO-8859-1 in my db UTF-8...
if you have any idea...
I'm working on a french web application (Spring+Ibatis+Postgre).
My PostgreSql version : 8.1
My db encoding is UTF-8.
My JDBc Driver version is 8.1-405-jdbc3
There is no problem to display the Euro (€) character in HTML pages, but in the PDF this caracter disepear !!!
Strange...
I've done a little test, this is the recuperation of a String "€ € € € € Euro € Euro € € € €" :
log.info(c.getObservation());
log.info(new String (c.getObservation().getBytes("UTF-8")));
log.info(new String (c.getObservation().getBytes("ISO-8859-1")));
INFO 17:49:10.468 ? ? ? ? ? Euro ? Euro ? ? ? ? (TestEuro.java:14)
INFO 17:49:10.468 € € € € € Euro € Euro € € € € (TestEuro.java:15)
INFO 17:49:10.468 € € € € € Euro € Euro € € € € (TestEuro.java:16)
Very strange, it seems that my observation have an encoding ISO-8859-1 in my db UTF-8...
if you have any idea...
Antivirus avast!: message Sortant sain. Base de donnees virale (VPS) : 080905-0, 05/09/2008 |
Hello Tno, You know that ISO-8859-1 does not have the Euro Symbol? Look for ISO-8859-15 instead... Daniel Migowski TNO schrieb: > Hello > > I'm working on a french web application (Spring+Ibatis+Postgre). > My PostgreSql version : 8.1 > My db encoding is UTF-8. > My JDBc Driver version is 8.1-405-jdbc3 > > There is no problem to display the Euro (€) character in HTML pages, > but in the PDF this caracter disepear !!! > Strange... > > I've done a little test, this is the recuperation of a String "*€ € € > € € Euro € Euro € € € €" *: > > log.info(c.getObservation()); > log.info(new String (c.getObservation().getBytes("UTF-8"))); > log.info(new String (c.getObservation().getBytes("ISO-8859-1"))); > > INFO 17:49:10.468 ? ? ? ? ? Euro ? Euro ? ? ? ? (TestEuro.java:14) > INFO 17:49:10.468 € € € € € Euro € Euro € € € € > (TestEuro.java:15) > INFO 17:49:10.468 € € € € € Euro € Euro € € € € (TestEuro.java:16) > > Very strange, it seems that my observation have an encoding ISO-8859-1 > in my db UTF-8...
Daniel Migowski schrieb: > Hello Tno, > > You know that ISO-8859-1 does not have the Euro Symbol? Look for > ISO-8859-15 instead... Oh, and have a look at the Constructors of the String class, and read the comments. Further have a look at your system properties and learn about the differences between win1250 and iso-8859-[1,15].