Johan Compagner wrote:
are properties files not really read in by the default system encoding?
So if you have youre system encoding on iso8859-2 then it should read properties files like that.
No, they are not. My system encoding is iso8859-2 but property files are read as they were in iso8859-1 substituting ? for every "unknown" character.
http://java.sun.com/j2se/1.4.2/docs/api/java/util/Properties.html
So the only correct way is escaping. Not unusable, but cumbersome. But definitely not a showstopper.

in eclipse you can set the default encoding for youre properties files if you want (see General -> Content Types)
Thank you. I overlooked this option. Though I knew I can set the encoding of specific property file.

-Matej
johan


Matej Knopp wrote:

Tried it. But I had to set the encoding of property files to iso8859-2 manually. When I forgot it, eclipse threw away all national charactar (a got ? instead). And using this approach I had two property files for each class (one unenscaped and one escaped).

Maybe there can be a better solution. I just don't get it, why are the properties in latin1 while there's unicode support in java everywhere.

Nevertheless, while this is an issue, it's certainly not a big one. It's a matter of which workaround to use :)

-Matej

Chris Turner wrote:

Build your properties files using you local (latin 2) encoding so that you don't need to put any escaped characters in. Then, as part of the build pocess run native2ascii on all of the properties files to get all the extended characters correctly escaped.

regards,
Chris

Matej Knopp wrote:

Hi,

there's a big discussion today about customizing validator messages/their resource keys. Would it be possible in future to decouple the messages from property files? I think resource bundle is a good thing, when you are using latin 1. For all other encoding is a pain, because you have to escape each foreign character. In my country, we are using latin 2 and a lot of characters not found in latin1. So using property files for this feels really cumbersome.

Would id be possible to have an interface with function similiar to this?
interface IMessageProvider
{
   String getString(Component component, String path, Locale locale);
}

With a reasonable default (caching) implementation that would use property files?
And I one could use different implementation (with xml or whatever)

-Matej


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user





-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user




-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user



-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user




-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to