Connecting Tech Pros Worldwide Help | Site Map

ResourceBundle and charset

Newbie
 
Join Date: Aug 2009
Location: Viet Nam
Posts: 12
#1: Aug 26 '09
I have a resource_vi.properties file (wrote in Vietnamese), when I use ResourceBundle to get data from that file then set them to hashmapData, they didn't display correctly in the jsp file. I also set <meta ... UTF-8> and <%@page ... UTF-8'%> tags in the jsp files already.
I dont know why????
Pls help me.
Thanks in advance!
Kind regards!
JosAH's Avatar
Expert
 
Join Date: Mar 2007
Posts: 10,611
#2: Aug 26 '09

re: ResourceBundle and charset


Quote:

Originally Posted by Ha Nguyen View Post

I have a resource_vi.properties file (wrote in Vietnamese), when I use ResourceBundle to get data from that file then set them to hashmapData, they didn't display correctly in the jsp file. I also set <meta ... UTF-8> and <%@page ... UTF-8'%> tags in the jsp files already.
I dont know why????
Pls help me.
Thanks in advance!
Kind regards!

If you're using PropertyResourceBundle classes (and it looks like you do) note that these files have to be in ISO 8859-1 format because Properties objects can't read any other file format. You also have the native2ascii tool in your JDK that can convert your files to the correct format.

kind regards,

Jos
Newbie
 
Join Date: Aug 2009
Location: Viet Nam
Posts: 12
#3: Aug 26 '09

re: ResourceBundle and charset


Thanks Jos,
But how i dont know to use natice2ascii tool. pls tell me more clearly and show me a demo.
Best regards.
JosAH's Avatar
Expert
 
Join Date: Mar 2007
Posts: 10,611
#4: Aug 26 '09

re: ResourceBundle and charset


Quote:

Originally Posted by Ha Nguyen View Post

Thanks Jos,
But how i dont know to use natice2ascii tool. pls tell me more clearly and show me a demo.
Best regards.

Google could've answered you quicker than I can; read this.

kind regards,

Jos
Newbie
 
Join Date: Aug 2009
Location: Viet Nam
Posts: 12
#5: Aug 27 '09

re: ResourceBundle and charset


Thanks so much, Jos
I resolved that problem.

Ha
Reply


Similar Java bytes