Re: [Wicket-user] The problem about encoding and event in ajax

2006-10-02 Thread Ingram Chen
(weird, I sent mail two days ago, but it is rejected. I send again)anyway, I found that Ajax request are all encoded as UTF-8 no matter what encoding used in the web page. And Tomcat always re-encode ajax request to ISO8859-1 (don't known why...) so I need to recover encoding back to UTF-8

Re: [Wicket-user] The problem about encoding and event in ajax

2006-09-26 Thread Ingram Chen
sorry.. I don't exactly understand what you mean, do you mean browser's charactor encoding mode ? if so, my browser's Charactor Encoding switch to Big5 when request set to Big5.anyway, I just create a quickstart with encoding cp866, a Russian encoding. I can't read Runssian, either. but it should

Re: [Wicket-user] The problem about encoding and event in ajax

2006-09-25 Thread Ingram Chen
Ouch! I also has similar problem... except that my encoding is Big5 (tranditional chinese)I try to build latest 1.x branch but maven complain:===Reason: Unable to download the artifact from any repository wicket:wicket-parent:pom:1.2-SNAPSHOTfrom the

Re: [Wicket-user] The problem about encoding and event in ajax

2006-09-25 Thread Martijn Dashorst
http://www.wicket-wiki.org.uk/wiki/index.php/Wicketfromsource On 9/25/06, Ingram Chen [EMAIL PROTECTED] wrote: Ouch! I also has similar problem... except that my encoding is Big5 (tranditional chinese) I try to build latest 1.x branch but maven complain:

Re: [Wicket-user] The problem about encoding and event in ajax

2006-09-25 Thread Ingram Chen
Thanks information, I just manually compile and test latest snapshop. But unfortunately the encoding still not work right...I will create a quickstart to reproduce it!On 9/25/06, Martijn Dashorst [EMAIL PROTECTED] wrote: http://www.wicket-wiki.org.uk/wiki/index.php/WicketfromsourceOn 9/25/06,

Re: [Wicket-user] The problem about encoding and event in ajax

2006-09-25 Thread Ingram Chen
Ok, wicket-example can reproduce this bug:go to:http://www.wicket-library.com/wicket-examples/ajax?wicket:bookmarkablePage=:wicket.examples.ajax.builtin.EditableLabelPage and input to a EditableLabel by several chars: French êèéæøåand output become: French êèÃæøå On 9/25/06, Ingram Chen

Re: [Wicket-user] The problem about encoding and event in ajax

2006-09-25 Thread Johan Compagner
This is not a thing wicket can do something about.This is the URI encoding that must be set in the tomcat connector itself: URIEncoding=UTF-8Because it is a http get request the params are encoded differently (a different property) by tomcat Why that is i don't know. But you just have to set

Re: [Wicket-user] The problem about encoding and event in ajax

2006-09-25 Thread Matej Knopp
Well, if this causes trouble, perhaps we could post the information. It is a bit more work but it would be worth it. -Matej Johan Compagner wrote: This is not a thing wicket can do something about. This is the URI encoding that must be set in the tomcat connector itself: URIEncoding=UTF-8

Re: [Wicket-user] The problem about encoding and event in ajax

2006-09-25 Thread Matej Knopp
That's strange. I've tried wicket examples and the only one that didn't work was the editable label one, which used get to send the data to server. All other examples worked for me. I don't understand why you can't use utf-8 encoding. What has this to do with your database encoding? In java

Re: [Wicket-user] The problem about encoding and event in ajax

2006-09-25 Thread Ingram Chen
Well, the database is only allowed to store chars encoded as Big5. If user input charactors, which defined in Unicode but outside of Big5 cover, the database only store garbage code like ???. By setting page encoding to Big5, the browser will escape non-Big5 chars to #; automatically.

Re: [Wicket-user] The problem about encoding and event in, ajax

2006-09-25 Thread Arseny
Thanks! It helped to deal with my problem (I had the same)!:) Message: 1 Date: Mon, 25 Sep 2006 16:45:11 +0200 From: Matej Knopp [EMAIL PROTECTED] Subject: Re: [Wicket-user] The problem about encoding and event in ajax To: wicket-user@lists.sourceforge.net Message-ID: [EMAIL

Re: [Wicket-user] The problem about encoding and event in ajax

2006-09-25 Thread Johan Compagner
Can't the driver do that conversion for you?What happens if you just create a String in java with some special charsand write that to the database?The driver should be able to convert it. Or are you saying that you need to really escape it like # ?? The char just can't be translated into

Re: [Wicket-user] The problem about encoding and event in ajax

2006-09-25 Thread Matej Knopp
Yeah, I also thing that web-layer is not the best place for doing such conversion. I know it would require additional effort but I think doing the conversion at DAO layer would be much safer. -Matej Johan Compagner wrote: Can't the driver do that conversion for you? What happens if you just

Re: [Wicket-user] The problem about encoding and event in ajax

2006-09-25 Thread Ingram Chen
Thanks the advice!Some chars just can't translated into Big5. Big5 is popular Chinese encoding before unicode in Taiwan... etc and it lack some rare chars defined in unicode.make conversion at DAO layer would be good or even migrate db to unicode is better but it require a lot effort. My

Re: [Wicket-user] The problem about encoding and event in ajax

2006-09-22 Thread Erik van Oosten
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 ?.

Re: [Wicket-user] The problem about encoding and event in ajax

2006-09-22 Thread 王磊
In fact, i use utf-8 as my coding. The following is the content of the html. ?xml version=1.0 encoding=UTF-8? html head meta http-equiv=Content-Type content=text/html; charset=UTF-8 /head body form wicket:id=formCountry: input type=text wicket:id=ac size=50 //form /body /html I also tried many

Re: [Wicket-user] The problem about encoding and event in ajax

2006-09-22 Thread Erik van Oosten
Hello, I missed the point that you are using the AutoCompleteTextField. Sorry, can't help you there. Erik. 王磊 schreef: In fact, i use utf-8 as my coding. The following is the content of the html. ?xml version=1.0 encoding=UTF-8? html head meta http-equiv=Content-Type

Re: [Wicket-user] The problem about encoding and event in ajax

2006-09-22 Thread Martijn Dashorst
We have had some problems with Ajax and UTF-8 encoding. You'll have to configure the uri encoding on your httpconnector to use UTF-8. In tomcat that would go into your server.xml Martijn On 9/22/06, 王磊 [EMAIL PROTECTED] wrote: In fact, i use utf-8 as my coding. The following is the content of

Re: [Wicket-user] The problem about encoding and event in ajax

2006-09-22 Thread 王磊
Also it brings some trouble,but i can solve the problem of encoding. But i can't know why there is not a event in the server while i input or paste a chinese word in the AutoCompleteTextField. I am not familiar with javascript. Thanks for your advice . - Original Message - From:

Re: [Wicket-user] The problem about encoding and event in ajax

2006-09-22 Thread Johan Compagner
for this we need to have a sample case.Also i checked in a encoding problem in the 1.2.x branch (and 2.0 but i don't think that one is completely fixed yet...)So if you could build/test it from svn maybe it is fixed then. johanOn 9/22/06, 王磊 [EMAIL PROTECTED] wrote: Also it brings some trouble,but

Re: [Wicket-user] The problem about encoding and event in ajax

2006-09-22 Thread 王磊
I think this problem is caused by javaSciprt. Additionally, i can use textfield with ajx. There is no problems. The following is the code. The code are simple,most of them are the same as the example of ajax. Just with a println statement to show whether there is a event while