Dear ??,
The problem is because you can not encode Chinese characters in
ISO-8859-1. You must use UTF-8 throughout your application.
> String newInput = new String(input.getBytes("iso8859-1"), "UTF-8");
first converts the string to ISO8859-1 and thereby replaces all Chinese
characters with a "?".
Please make sure that the HTML pages that Wicket renders are in UTF-8.
This true by default, but to be sure you could do
getRequestCycleSettings().setResponseRequestEncoding("UTF-8")
Then replace the line above with:
String newInput = input;
Regards,
Erik.
王磊 schreef:
> I just try to write a book about wicket.(It's written in chinese,and
> it's free to get a e-book).
> But while i writing a ajax example,i got a stange problem.
>
> I writed a auto-complete text application with AutoCompleteTextField
> control.
> But i got the following 2 problems.
>
> 1. If i input a chinese word,no request is sent to the server side.(I
> write "println" in server application,no output).
>
> 2. If in input a chinese word,then input a letter like 'd',the server
> side will get a string input like "???d", it's in wrong code. I use
> the following code to get the right input.
>
> String newInput = new String(input.getBytes("iso8859-1"), "UTF-8");
>
>
> I think these problems are caused by javascript,because i am not
> familiar with javascript.
> So i can't give reasons.
> May somebody can give a patch.
--
Erik van Oosten
http://www.day-to-day-stuff.blogspot.com/
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user