danielobs Posted March 24, 2010 Share Posted March 24, 2010 Hi,I would like to translate files with messages into Polish lang. I started with jasperserver_messages.properties file but unfortunately I have a problem with national characters. What encoding should I use to get the Polish national characters. UTF-8 and ISO 8859-2 do not properly display nationals characters. Regards, Daniel Link to comment Share on other sites More sharing options...
mdahlman Posted March 26, 2010 Share Posted March 26, 2010 Daniel,Java bundles (properties files) must be ascii. OK, that's not exactly true, they must be ISO 8859-1, but it's not so different from ascii. This is a Java requirement, not a JasperServer requirement. Therefore you need unicode escape sequences for any non-ascii characters.So for example you might want to write this in French:remove.confirm.message=Êtes-vous sûr de vouloir supprimer les éléments sélectionnés ?But instead you need to write this:remove.confirm.message=\u00CAtes-vous s\u00FBr de vouloir supprimer les \u00E9l\u00E9ments s\u00E9lectionn\u00E9s\u00A0?As a practical matter, it's really tough to write files like that. So you need a tool to help you. The most basic idea is to write with a native characterset and convert it. Java has a built-in utility called native2ascii. Google that for all the details.More commonly, you'll want a tool that manages things for you more cleanly. iReport, for example, is a good properties file editor. It allows you to just type the string as you normally would. And then behind the scenes it converts all the non-ascii characters to the appropriate escape sequences when you save the file. I find the iReport editor very good... but not at all intuitive. Post to the iReport forum if you need help figuring out how to edit properties files in it. (There are lots of other tools you could use as well.)Regards,Matt Link to comment Share on other sites More sharing options...
danielobs Posted March 26, 2010 Author Share Posted March 26, 2010 Hello Matt, Thank you for this information. Regards, Daniel Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now