Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

french characters shown as ? in jsp

 
Kiran Gaddam
Ranch Hand
Posts: 35
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello All...
I am using spring internalization for my application.

and when user click on language French some characters are shown as "?"

I hope you might have defiantly dealt with this situation. I searched, but not much help is available.

Pass me a solution if you have..?

Regards
Kiran.G
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How is encoding and decoding handled at the various steps along the way?
 
Kiran Gaddam
Ranch Hand
Posts: 35
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the reply

In my jsp it is like this..


and all the messages are in messages_fr.properties file
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is the file UTF-8 encoded and not corrupted?

Does the browser have a font installed that contains whatever character you are trying to display?
 
Kiran Gaddam
Ranch Hand
Posts: 35
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am sure that UTF is not corrupted..

But I can install font in my browser.. how about client browser..? How can I expect that client browser has those characters installed.

Is there any other way to do the same..

Thank You
 
Paul Clapham
Sheriff
Posts: 21892
36
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
But if you're seeing question marks, that indicates an encoding problem, not a font problem.

Are those French characters hard-coded in your JSP, or are they part of the data which the JSP gets from elsewhere and puts into the HTML?
 
Kiran Gaddam
Ranch Hand
Posts: 35
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The french data is hard coded in properties file... and refered in jsp using spring message tag...

the info "But if you're seeing question marks, that indicates an encoding problem, not a font problem. " was help ful.

I am looking on it but found none upto now. and still researching on it.

Thanks for that..
 
Paul Clapham
Sheriff
Posts: 21892
36
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Kiran Gaddam wrote:The french data is hard coded in properties file...


This is a "properties" file as in a text file which is being handled by the java.util.Properties class? If that's the case then it is supposed to be encoded in ISO-8859-1. Perhaps your properties file is encoded in UTF-8 as well?
 
Kiran Gaddam
Ranch Hand
Posts: 35
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ok thanks..

Can you also give some light on how to encode the properties file into ISO-8859-1..

Really thanks for your time..
 
Paul Clapham
Sheriff
Posts: 21892
36
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
With a text editor which understands both UTF-8 and ISO-8859-1.
 
Kiran Gaddam
Ranch Hand
Posts: 35
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You mean...
that i should convert the word... "Où est"
to "O & # 249; est" and store in property file..

If yes... it is displaying correctly as "Où est" in the output. But may be in future if we need to edit than it might be problem...

 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!