Korean/Japanese/Chinese characters showing up wrong, but ONLY within the SELECT OPTION tag for a drop down list
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Donna_Varnell
Posted On:   Tuesday, June 25, 2002 12:56 PM

I have a full servlet/jsp application that has been internationalized using UTF-8. Everything is working perfectly EXCEPT drop down lists. At the beginning of my jsp, I have the following code to get the Resource Bundle and save the properties: <% Locale locale=null; locale = (Locale)session.getAttribute("userLocale"); if (locale == null){ locale=request.getLocale(); ResourceBundle bundle = ResourceBundle.getBundle("Message",locale); session.setAttribute("userLocale", locale); for (Enumeration e = bundle.getKeys();e.hasMoreElements();) { String key = (String)e.nextElement(); String s = bundle.getString(   More>>

I have a full servlet/jsp application that has been internationalized using UTF-8. Everything is working perfectly EXCEPT drop down lists.


At the beginning of my jsp, I have the following code to get the Resource Bundle and save the properties:


			
<%
Locale locale=null;
locale = (Locale)session.getAttribute("userLocale");
if (locale == null){
locale=request.getLocale();
ResourceBundle bundle = ResourceBundle.getBundle("Message",locale);
session.setAttribute("userLocale", locale);

for (Enumeration e = bundle.getKeys();e.hasMoreElements();) {
String key = (String)e.nextElement();
String s = bundle.getString(key);
session.setAttribute(key,s);
}
}
%>


Then I use session.getAttribute("property_name") to retrieve the property from the Resource Bundle. If I do this within the OPTION tag, Korean/Japanese/Chinese characters show up as blocks instead of characters. The character on the rest of the page are perfectly fine - it's just the options in the drop down list that show up wrong!


			



Any ideas?


Thanks, Donna

   <<Less
About | Sitemap | Contact