views:

211

answers:

1
+1  Q: 

Glassfish encoding

I'm using the code in this example example and in the runUpdate() function which i put in a javabean in a web application in Netbeans 6.8 with Glassfish v3. It seems i have an encoding problem because question marks appear in the table.

I have tried so far:

  1. In nbproject->private->private.properties add runtime.encoding=UTF-8>
  2. In project->properties->sources->encoding utf-8
  3. In program files->netbeans->etc->netbeans_conf in netbeans_default_options i add -J-DFile.encoding=UTF-8
  4. In project->properties->build->compiling->additional compiler options -encoding utf-8
  5. In sun-web.xml i added <locale-charset-info default-locale="UTF-8"> <locale-charset-map locale="" charset=""/> <parameter-encoding default-charset="UTF-8"/> </locale-charset-info>

Also when i use system.out.print() in the glassfish output panel i get gibberish. I'm in the last level of madness please take a look. Thank you.

EDIT Also when i do listing .5 i get a glassfish error:

WARNING: WEB0500: default-locale attribute of locale-charset-info element is being ignored
+1  A: 

Are you sure your browser is set to UTF-8. By default most browsers do not display in UTF. Start with the browser and work backwards. Is your datasource storing the data in UTF-8? By default Java is in UTF-8 so I am not sure that GF is your real issue.

TheSteve0
Thank you for your answer.I use the example code to input data in a table in fusion tables.Please look at the following linkhttp://tables.googlelabs.com/DataSource?dsrcid=136056If i use their ui it's ok(all entries in the table except the last one) and if i use the api i get the last entrie of the table which is corrupted.Yes my browser is in utf-8.And all the sources have encoding utf-8
Argiropoulos Stavros
Bizarre - I really hated working with different encodings. If you delete the last row does the new last row get messed up? If not then perhaps your last row is really not in UTF-8.
TheSteve0