[ 
http://jira.nuxeo.org/browse/WEB-189?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=51288#action_51288
 ] 

Radu Darlea commented on WEB-189:
---------------------------------

"In all http header, we must specify that forms accept only UTF8 and generate 
responses in UTF8 too."
In org.nuxeo.ecm.webengine.server.resteasy.WebEngineServlet, which is 
responsible with all the requests that are made on sites, we have set the 
content type of the response and ensured it is UTF-8
   ...
   httpServletResponse.setContentType("text/xml; charset=utf-8");
We have also ensured that all html pages that are generated have the charset 
'UTF-8'.

"You should ensure that the free marker template engine encodes all pages in 
UTF8. "
We also ensured that the configuration of the 
org.nuxeo.ecm.platform.rendering.fm.FreemarkerEngine uses the UTF-8 encoding 
and that the locale is the same as the one from the client.
   ...
   cfg.setEncoding(Locale.FRENCH, "UTF-8");
   cfg.setLocale(Locale.FRENCH);

Also we have refactored  the code from nuxeo-webengine-core so that the Locale 
taken from the request is used when searching the messages.
org.nuxeo.ecm.webengine.model.MessagesBundle was modified so that it uses 
internally an java.util.ResourceBundle that is generated with the Locale taken 
from the request.

ResourceBundle.getBundle("i18n/messages", locale);

With all these modifications, the problem still persists when starting Jboss 
server from a console that has set the locale as Posix.


> Use the machine locale
> ----------------------
>
>                 Key: WEB-189
>                 URL: http://jira.nuxeo.org/browse/WEB-189
>             Project: Nuxeo Web Engine
>          Issue Type: Bug
>            Reporter: Radu Darlea
>            Priority: Blocker
>   Original Estimate: 2 days
>  Remaining Estimate: 2 days
>
> The characters displayed in views are dependent on the system locales. The 
> server running on a machine with UTF-8 locales sends the right encoded 
> characters to the client. Using different locale (like POSIX) scrambles the 
> view.
> The MessageBundle needs to use the correct locales. In EP this was 
> accomplished in I18NUtils by getting the ResourceBundle with the requested 
> locale set. In WebEngine there is no opportunity to specify the locales.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.nuxeo.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        
_______________________________________________
ECM-tickets mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/ecm-tickets

Reply via email to