This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JSF and the fly likes Message bundle encoding Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "Message bundle encoding" Watch "Message bundle encoding" New topic
Author

Message bundle encoding

Kev D'Arcy
Ranch Hand

Joined: Jul 26, 2001
Posts: 75
I'm not sure of this is the right forum for this question, but here goes...
I've writen a JSF app and all seems well until it comes down to the multi-
language support. I have all of the on screen messages packaged into
properties files, and the English version is working a treat, but I'm having
problems with the Polish version...

I think it's to do with the file encoding on the properties file, but I'm
not sure. Basically whats happening is that when I save to file all looks
well, but when I open it to view it or run the Polish version of the app,
the Polish language specific characters are either missing or sqewed.
Initially the file was being saved as an ASCII file, but then I tried using
UTF-8 (which I understand should encompass the Polish character set) and
Unicode and none of these have fixed my problem...

Ok, here's what I'm running on:
OS: Win2K (though the target platform is Solaris)
JRE: 1.4.2_07 (Sun)
SE: Tomcat 4.1.31/WebSphere 5.0
JSF: 1.0

HELP!!!
Varun Khanna
Ranch Hand

Joined: May 30, 2002
Posts: 1400
Originally posted by Kev D'Arcy:
I'm not sure of this is the right forum for this question, but here goes...
I've writen a JSF app and all seems well until it comes down to the multi-
language support. I have all of the on screen messages packaged into
properties files, and the English version is working a treat, but I'm having
problems with the Polish version...

I think it's to do with the file encoding on the properties file, but I'm
not sure. Basically whats happening is that when I save to file all looks
well, but when I open it to view it or run the Polish version of the app,
the Polish language specific characters are either missing or sqewed.
Initially the file was being saved as an ASCII file, but then I tried using
UTF-8 (which I understand should encompass the Polish character set) and
Unicode and none of these have fixed my problem...

Ok, here's what I'm running on:
OS: Win2K (though the target platform is Solaris)
JRE: 1.4.2_07 (Sun)
SE: Tomcat 4.1.31/WebSphere 5.0
JSF: 1.0

HELP!!!


I don't think issue here is JSF.
How are you ensuring UTF-8 encoding ? You would be required to do these two things :
i) At the jsp level, use the page directive for setting encoding to
UTF-8 [I am not sure of syntax but it is either "charset" or "encoding"]
ii) At the server side ensure you encode your request to UTF-8 again (your submitted request would surely be UTF-8 encoded but this would be needed)

P.S. I assume your database supports UTF-8 encoding.
[ March 31, 2005: Message edited by: Varun Khanna ]

- Varun
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Message bundle encoding
 
Similar Threads
Problem I18N with JSF
Overriding Message Bundles in JSF 2.x
Foreign Languages
internationalization problem
No tag "ajax" defined in tag library imported with prefix "f"