You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by JohnSmith333 <da...@msa.hinet.net> on 2007/12/15 02:49:40 UTC

The Textis incomprehensible

My wicket code in xp  show normally.  The text isn't incomprehensible. 
But when I deploy the code to linux os and in weblogic ap server. 
The text from db table date also OK. The text code in html also OK. 
But the text code in wicket program all are incomprehensible. 
I am use the Chinese language. Just like below: 
 Label lblTest=new Label("lblTest","測試"); 
The "測試" is incomprehensible in browser. 
All html code have write the below already. 
 <?xml version="1.0" encoding="UTF-8"?> 
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> 

 Coule anyone help me to solve the Text incomprehensible problem? Versy
thanks

-- 
View this message in context: http://www.nabble.com/The-Textis-incomprehensible-tp14339892p14339892.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: The Textis incomprehensible

Posted by Landry Soules <la...@gmail.com>.
If you program with Eclipse, make sure that " text file encoding" 
(preferences>general>workspace) is set to UTF-8.


JohnSmith333 a écrit :
> My wicket code in xp  show normally.  The text isn't incomprehensible. 
> But when I deploy the code to linux os and in weblogic ap server. 
> The text from db table date also OK. The text code in html also OK. 
> But the text code in wicket program all are incomprehensible. 
> I am use the Chinese language. Just like below: 
>  Label lblTest=new Label("lblTest","測試"); 
> The "測試" is incomprehensible in browser. 
> All html code have write the below already. 
>  <?xml version="1.0" encoding="UTF-8"?> 
>  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> 
>
>  Coule anyone help me to solve the Text incomprehensible problem? Versy
> thanks
>
>   


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: The Textis incomprehensible

Posted by Gabor Szokoli <sz...@gmail.com>.
Hi!

I do not know what could cause the difference between operation on
Linux and on XP, (perhaps some locale is not installed)  but here is a
workaround you could try:

On Dec 15, 2007 2:49 AM, JohnSmith333 <da...@msa.hinet.net> wrote:
>
> My wicket code in xp  show normally.  The text isn't incomprehensible.
> But when I deploy the code to linux os and in weblogic ap server.
...
>  Label lblTest=new Label("lblTest","測試");

Instead of embedding localised strings into the java code, you could
try to put them into property files, and use a StringResourceModel to
reference them:
Label lblTest=new Label("lblTest",new StringResourceModel("testKey"));

This is a good strategy to prepare your application for multi-language
support anyway.


Gabor

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org