-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: File encoding ValidationMessages
PostPosted: Sun Jul 04, 2010 5:13 pm 
Pro
Pro

Joined: Wed Nov 05, 2003 7:22 pm
Posts: 211
Hi,

I'm creating validationMessages for languages such as Russian, etc. However, when I encode them as utf-8, I get all sorts of gibberish in the front end. I noticed that the default ValidationMessages.properties files are all encoded as ANSI and the extended characters are encoded as escape sequences.

Is there a particular reason for this? It makes it a nightmare to work with these files in most languages except English.

Kind regards,

Marc


Top
 Profile  
 
 Post subject: Re: File encoding ValidationMessages
PostPosted: Mon Jul 05, 2010 5:01 am 
Hibernate Team
Hibernate Team

Joined: Thu Apr 05, 2007 5:52 am
Posts: 1689
Location: Sweden
Hi,

from the javadoc of PropertyResourceBundle:
Quote:
PropertyResourceBundle can be constructed either from an InputStream or a Reader, which represents a property file. Constructing a PropertyResourceBundle instance from an InputStream requires that the input stream be encoded in ISO-8859-1. In that case, characters that cannot be represented in ISO-8859-1 encoding must be represented by Unicode Escapes, whereas the other constructor which takes a Reader does not have that limitation.


Turns out that ResourceBundle.getBundle uses the InputStream constructor and hence the need for ISO-8859-1.

--Hardy


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.