You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Gordian Yuan <go...@gmail.com> on 2009/04/09 12:14:56 UTC

It's a struts2 bug? or just I miss something or configuration error

Hi all,

I encountered the issue of international and I don't know this is a bug or
just I miss something or configuration error.

The issue is

I have a simple page like this

<s:form action="saveCampaign">
   <s:textfield id="name" name="name" key="createCampaign.name"/>
   <s:submit key="createCampaign.create"/>
</s:form>

and i have two properties

#en_US properties
createCampaign.name=Name
createCampaign.submit=Create

#zh_CN properties
createCampaign.name=名称
createCampaign.submit=创建

In english version everything is fine, but in chinese version the
s:textfield is fine, but s:submit tag is some messy code!

I have change the page like this

<s:form action="saveCampaign">
   <s:textfield id="name" name="name" key="createCampaign.name"/>
   <s:submit key="createCampaign.name"/>
</s:form>

But the submit button still messy code ..

Is it a bug?

Any input will be welcome .. thx

Gordian

Re: It's a struts2 bug? or just I miss something or configuration error

Posted by Gordian Yuan <go...@gmail.com>.
Hi,Dave

I'm using a Maven plug-ins that at compile time will be automatically
native2ascii

I have just finally solve this problem, some jsp page I forgot to add the
following command
<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>

Together with this command,everyhing is fine.
This is my carelessness.

Thank you

Gordian


On Sat, Apr 11, 2009 at 7:33 AM, Dave Newton <ne...@yahoo.com> wrote:

> Gordian Yuan wrote:
>
>> and i have two properties
>>
>> #en_US properties
>> createCampaign.name=Name
>> createCampaign.submit=Create
>>
>> #zh_CN properties
>> createCampaign.name=名称
>> createCampaign.submit=创建
>>
>
> You can't just put Chinese text in a properties file, you have to use
> something like native2ascii to convert it into something Java can
> understand. Searching the web for java properties will provide resources, or
> just read the Java docs:
>
> http://java.sun.com/javase/6/docs/api/java/util/Properties.html
>
> Dave
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

Re: It's a struts2 bug? or just I miss something or configuration error

Posted by Dave Newton <ne...@yahoo.com>.
Gordian Yuan wrote:
> and i have two properties
> 
> #en_US properties
> createCampaign.name=Name
> createCampaign.submit=Create
> 
> #zh_CN properties
> createCampaign.name=名称
> createCampaign.submit=创建

You can't just put Chinese text in a properties file, you have to use 
something like native2ascii to convert it into something Java can 
understand. Searching the web for java properties will provide 
resources, or just read the Java docs:

http://java.sun.com/javase/6/docs/api/java/util/Properties.html

Dave


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: It's a struts2 bug? or just I miss something or configuration error

Posted by Greg Lindholm <gl...@yahoo.com>.
Can you do a view source on the page from your browser and post what the form
looks like.


gordian yuan wrote:
> 
> I forgot to say that I am using Struts 2.1.6
> 
> On Thu, Apr 9, 2009 at 6:14 PM, Gordian Yuan <go...@gmail.com>
> wrote:
> 
>> Hi all,
>>
>> I encountered the issue of international and I don't know this is a bug
>> or
>> just I miss something or configuration error.
>>
>> The issue is
>>
>> I have a simple page like this
>>
>> <s:form action="saveCampaign">
>>    <s:textfield id="name" name="name" key="createCampaign.name"/>
>>    <s:submit key="createCampaign.create"/>
>> </s:form>
>>
>> and i have two properties
>>
>> #en_US properties
>> createCampaign.name=Name
>> createCampaign.submit=Create
>>
>> #zh_CN properties
>> createCampaign.name=名称
>> createCampaign.submit=创建
>>
>> In english version everything is fine, but in chinese version the
>> s:textfield is fine, but s:submit tag is some messy code!
>>
>> I have change the page like this
>>
>> <s:form action="saveCampaign">
>>    <s:textfield id="name" name="name" key="createCampaign.name"/>
>>    <s:submit key="createCampaign.name"/>
>> </s:form>
>>
>> But the submit button still messy code ..
>>
>> Is it a bug?
>>
>> Any input will be welcome .. thx
>>
>> Gordian
>>
> 
> 

-- 
View this message in context: http://www.nabble.com/It%27s-a-struts2-bug--or-just-I-miss-something-or-configuration-error-tp22968079p22977533.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: It's a struts2 bug? or just I miss something or configuration error

Posted by Gordian Yuan <go...@gmail.com>.
I forgot to say that I am using Struts 2.1.6

On Thu, Apr 9, 2009 at 6:14 PM, Gordian Yuan <go...@gmail.com> wrote:

> Hi all,
>
> I encountered the issue of international and I don't know this is a bug or
> just I miss something or configuration error.
>
> The issue is
>
> I have a simple page like this
>
> <s:form action="saveCampaign">
>    <s:textfield id="name" name="name" key="createCampaign.name"/>
>    <s:submit key="createCampaign.create"/>
> </s:form>
>
> and i have two properties
>
> #en_US properties
> createCampaign.name=Name
> createCampaign.submit=Create
>
> #zh_CN properties
> createCampaign.name=名称
> createCampaign.submit=创建
>
> In english version everything is fine, but in chinese version the
> s:textfield is fine, but s:submit tag is some messy code!
>
> I have change the page like this
>
> <s:form action="saveCampaign">
>    <s:textfield id="name" name="name" key="createCampaign.name"/>
>    <s:submit key="createCampaign.name"/>
> </s:form>
>
> But the submit button still messy code ..
>
> Is it a bug?
>
> Any input will be welcome .. thx
>
> Gordian
>