[xwiki-dev] Re: Trying to understand I8N...

Vincent Massol vincent at massol.net
Sun Apr 8 22:27:57 CEST 2007


On Apr 8, 2007, at 10:10 PM, Zeljko Trogrlic wrote:

> Vincent Massol wrote:
>> On Apr 7, 2007, at 8:00 PM, Zeljko Trogrlic wrote:
>>> Vincent Massol wrote:
>>>> Exactly which is why this is best left to the user to decide  
>>>> which encoding they need to use... I don't think we should force  
>>>> our encoding. However I'm proposing that we do:  
>>>> System.setProperty("file.encoding", getParam("xwiki.encoding"))  
>>>> in XWiki initialization to set the platform encoding to be the  
>>>> encoding specified in xwiki.cfg.
>>>
>>> I think it should be vice-versa. Stick to platform or use UTF-8  
>>> don't add new encoding parameter.
>> xwiki.encoding already exists. The point here is to make platform  
>> = xwiki encoding = database driver encoding = web encoding = all  
>> encoding used everywhere, all this without the user having to  
>> change 7 places...
>
> Of course, bur Java already has file.encoding. Why another property?

Good question.

Maybe simply because we need a way to configure it and XWiki already  
has a configuration mechanism so it's probably logical to find the  
encoding to use defined there. I guess we could name the property  
"file.encoding" inside the xwiki.cfg file but the naming rule is that  
properties should start with xwiki in that file.

Or we could leave it outside of XWiki's configuration but in that  
case we can't provide a default value that is externalized.

I'l not sure about all this so all input is welcome.

I'll try to prepare a synthesis of all we discussed on i8n next week.

Thanks
-Vincent





More information about the devs mailing list