struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Qunhuan Mei (JIRA)" <j...@apache.org>
Subject [jira] Commented: (WW-2345) Default locale is not evaluated always using client default locale
Date Tue, 03 Feb 2009 10:13:45 GMT

    [ https://issues.apache.org/struts/browse/WW-2345?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=45554#action_45554
] 

Qunhuan Mei commented on WW-2345:
---------------------------------

Hi, I need to close my issue (thanks for the reply, Dave!).

I just learnt that the Java tools (e.g. IDE) only know how to handle files of ASCII and \udddd
Unicode code sequences, but not UTF-8 chars. Since all locale specific files will be handled
by IDE (in my case) and packed before deployed to the Tombat,  thus the UTF-8 coding was lost.


The correct way to handle this is to use JDK's native2ascii.exe to turn the UTF-8 encoded
file into a \udddd ones. After the file transformation, the Chinese chars can be displayed
correctly using Struts2's existing locale handling mechanism.



> Default locale is not evaluated always using client default locale
> ------------------------------------------------------------------
>
>                 Key: WW-2345
>                 URL: https://issues.apache.org/struts/browse/WW-2345
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Core Interceptors
>    Affects Versions: 2.0.9, 2.0.11, 2.1.0
>         Environment: Italian Server / Spanish browser
>            Reporter: Andrea Gigliotti
>             Fix For: Future
>
>         Attachments: blank.tar.gz
>
>
> Using the blank webapp, adding the "package_it.properties" file, there is a strange behaviour
if you have the default locale of the server different from "en" (in this case "it_IT") and
the client different from "en" (in this case "es_ES").
> Calling the homepage of the blank webapp, the default locale is evaluated using the client
default locale ("es_ES"), but clicking on "English" (thus selecting the "en" locale, that
is not defined), it should use the default "client" locale, while it uses the "server" default
locale.
> Notice that clearing the cookies and then calling the homepage again, it works correctly.
> -----------------
> The original description of the issue was:
> I tried using the example application (struts2-blank-2.0.11.war) and it working fine
using package_es.properties and package.properties, that is I getting the messages in the
right language. 
> I got the same result using package_fr.properties rather than package_es.properties,
they working fine!
> But if I rename the package_es.properties in package_it.properties, it did't work, that
is the messages are always displayed in the O.S. language. 
> Anyone can help me?
> It seems to be a bug related with the "it" extension !!! 
> Thank's for your time! 
> Andrea

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message