• Post Reply Bookmark Topic Watch Topic
  • New Topic

tomcat 5 (jboss) handling hebrew chars  RSS feed

 
alen agmon
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello friends
im having troubles with a project that kept me awake for some nights now...

simple form in a jsp page using utf-8 declerative. (running on jboss 4 which is tomcat 5)
data submitted to a servlet that insert data to DB(MySql) .
--- till now everything is ok , i can see in the db the hebrew chars correctly!
the servlet forward to another jsp page.
that jsp page is calling to an ejb method that returns a record from the db,
the jsp page present that record.
ok....problems starts here:

a. when im not using any charset declerative (defaults to iso-8859-1)
the data is gibberish - but when im using browser's view source option - the data is shown correctly in the source .

b. when i manually set the browser's encoding to utf-8 - data is shown correctly.

so that mean i need to use utf-8 pageEncoding ..Right ?... Right! and so i did

i have tried every manipulation on the utf-8 : <%@pageEncoding ,<%@page ContentType , response.setChar... request.setChar.....

it was gibberish !! and now even in the view source option it shows gibberish

i really need help...
[ September 22, 2004: Message edited by: Bear Bibeault ]
 
Jeroen Wenting
Ranch Hand
Posts: 5093
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
have you tried

?

If so, your JDBC likely is going haywire, returning gibberish.
Check if you have to set something in there as well to properly output UTF-8.
You may also have to set some server config parameter to get the JVM to correctly handle UTF-8 internally.
 
alen agmon
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"..when i manually set the browser's encoding to utf-8 - data is shown correctly..."

that mean that the data comes out properly from the db its just an
encoding problem,

its like the browser tells me that this data should be displayed as UTF-8
but when i add the <%@page pageEncoding="UTF-8"%>
its all gibberish!!!
i just dont know what to do!!
please help
 
Balan Raj
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Whats the charset used at the DB ?? Is it set to UTF-8
Whats the Db & whats the JDBC driver that you use ?
 
alen agmon
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
im using MySql 4 with mySql-Connector/j 3.0 (production release)

the DB default charset is latin 1 but it supports utf-8

in my application im sending a utf-8 encoded form to a servlet that performs the insert -
data is shown correctly in the db!! thats why im almost sure its not a db problem , -
[ September 23, 2004: Message edited by: alen agmon ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!