Re: [HELP] I use struts + Velocity, I couldn't submit 1 form with unicode information! :(
Hi Xuan Tinh, I had created a filter, which set request.setCharacterEncoding('UTF-8') and filtering all url-pattern: *.do or *.vm ... now, everything is fine :) thank you all :) - Original Message - From: "Truong Xuan Tinh" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" Sent: Wednesday, June 21, 2006 5:44 PM Subject: Re: [HELP] I use struts + Velocity, I couldn't submit 1 form with unicode information! :( You must set both attributes like this:<%@ page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%> By the way, which version of Tomcat are you using? You can search the JIRA database of Tomcat to check whether it's a bug ot Tomcat. Pham Anh Tuan wrote: yes, I had set contentType="text/html; charset=UTF-8" but there's no effect :( - Original Message - From: "Truong Xuan Tinh" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" Sent: Wednesday, June 21, 2006 1:56 PM Subject: Re: [HELP] I use struts + Velocity, I couldn't submit 1 form with unicode information! :( Did you set the page directive in you JSP files like this? <%@ page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%> Pham Anh Tuan wrote: Sorry all you, I don't intend to flood the mailling list, but yesterday, after I had sent this email, mail server feedback to me that my email couldn't send :( ... So, that the reason why I sent this email so many times, sorry all :( about my situation, I can only save unicode characters into my DB with the form which has the header contains the attribute: enctype="multipart/form-data", if not I can not have unicode characters :( @ Tinh: I did the same thing like you suggested, make a filter and set "request.setCharacterEncoding(encoding);" but as you know, the result was there's no effect :( .. .it's still ISO-8859-1. if you must change encoding for every string ... hiz, that's a heavy work ... is there's any solution :( thanks all, - Original Message ----- From: "Truong Xuan Tinh" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" Sent: Tuesday, June 20, 2006 10:23 PM Subject: Re: [HELP] I use struts + Velocity, I couldn't submit 1 form with unicode information! :( Hi Tuan, Did you set the page encoding to UTF-8? And one more thing, set the characterEncoding of your request to UTF-8 before it hit your action (ie, in a filter or something like that). PS: I've found a bug in Tomcat with when encoding data to UTF-8 with the GET method (the POST method is OK). Although you set the characterEncoding of the request to UTF-8 in filter, but when it hit the action of Struts, the character is still in ISO-8859-1 :-( . Here is the quick fit for this: byte[] temp = originalString.getBytes("ISO-8859-1"); String result = new String (temp, "UTF8"); Hope this may help. PS: Do not flood the mailing list with duplicate message, you'll get ignored quickly. Pham Anh Tuan wrote: Hi all, I use Struts framework + Velocity, and I have a form with a text field, something like below: in velocity.properties file, I set: input.encoding=UTF-8 output.encoding=UTF-8 hiz, but with all above, I couldn't save unicode value of something property into my DB (Mysql 4.1, I had set all utf-8) :( but ... when I change the header of form tag like below, everything is fine, it's mean, I can save unicode value into DB :( ... I don't know why, help me plz :( thanks in advance, bowlkhin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [HELP] I use struts + Velocity, I couldn't submit 1 form with unicode information! :(
You must set both attributes like this:<%@ page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%> By the way, which version of Tomcat are you using? You can search the JIRA database of Tomcat to check whether it's a bug ot Tomcat. Pham Anh Tuan wrote: > yes, I had set contentType="text/html; charset=UTF-8" but there's no > effect :( > > - Original Message - From: "Truong Xuan Tinh" > <[EMAIL PROTECTED]> > To: "Struts Users Mailing List" > Sent: Wednesday, June 21, 2006 1:56 PM > Subject: Re: [HELP] I use struts + Velocity, I couldn't submit 1 form > with unicode information! :( > > >> Did you set the page directive in you JSP files like this? >> <%@ page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%> >> Pham Anh Tuan wrote: >>> Sorry all you, >>> >>> I don't intend to flood the mailling list, but yesterday, after I had >>> sent this email, mail server feedback to me that my email couldn't >>> send :( ... So, that the reason why I sent this email so many times, >>> sorry all :( >>> >>> about my situation, I can only save unicode characters into my DB with >>> the form which has the header contains the attribute: >>> enctype="multipart/form-data", if not I can not have unicode >>> characters :( >>> >>> @ Tinh: I did the same thing like you suggested, make a filter and set >>> "request.setCharacterEncoding(encoding);" but as you know, the result >>> was there's no effect :( .. .it's still ISO-8859-1. >>> >>> if you must change encoding for every string ... hiz, that's a heavy >>> work ... is there's any solution :( >>> >>> thanks all, >>> - Original Message - From: "Truong Xuan Tinh" >>> <[EMAIL PROTECTED]> >>> To: "Struts Users Mailing List" >>> Sent: Tuesday, June 20, 2006 10:23 PM >>> Subject: Re: [HELP] I use struts + Velocity, I couldn't submit 1 form >>> with unicode information! :( >>> >>> >>>> Hi Tuan, >>>>Did you set the page encoding to UTF-8? And one more thing, set the >>>> characterEncoding of your request to UTF-8 before it hit your action >>>> (ie, in a filter or something like that). >>>> PS: I've found a bug in Tomcat with when encoding data to UTF-8 >>>> with the >>>> GET method (the POST method is OK). Although you set the >>>> characterEncoding of the request to UTF-8 in filter, but when it >>>> hit the >>>> action of Struts, the character is still in ISO-8859-1 :-( . Here >>>> is the >>>> quick fit for this: >>>> byte[] temp = originalString.getBytes("ISO-8859-1"); >>>> String result = new String (temp, "UTF8"); >>>> Hope this may help. >>>> PS: Do not flood the mailing list with duplicate message, you'll get >>>> ignored quickly. >>>> Pham Anh Tuan wrote: >>>>> Hi all, >>>>> >>>>> I use Struts framework + Velocity, and I have a form with a text >>>>> field, something like below: >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> in velocity.properties file, I set: >>>>> >>>>> input.encoding=UTF-8 >>>>> output.encoding=UTF-8 >>>>> hiz, but with all above, I couldn't save unicode value of something >>>>> property into my DB (Mysql 4.1, I had set all utf-8) :( >>>>> >>>>> but ... when I change the header of form tag like below, everything >>>>> is fine, it's mean, I can save unicode value into DB :( ... I don't >>>>> know why, help me plz :( >>>>> >>>>> >>>> action="$link.setAction("/saveIt")"> >>>>> >>>>> thanks in advance, >>>>> >>>>> bowlkhin >>>>> >>>>> >>>> >>>> >>>> - >>>> To unsubscribe, e-mail: [EMAIL PROTECTED] >>>> For additional commands, e-mail: [EMAIL PROTECTED] >>>> >>>> >>> >>> >>> >>> - >>> To unsubscribe, e-mail: [EMAIL PROTECTED] >>> For additional commands, e-mail: [EMAIL PROTECTED] >>> >>> >> >> >> - >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [HELP] I use struts + Velocity, I couldn't submit 1 form with unicode information! :(
yes, I had set contentType="text/html; charset=UTF-8" but there's no effect :( - Original Message - From: "Truong Xuan Tinh" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" Sent: Wednesday, June 21, 2006 1:56 PM Subject: Re: [HELP] I use struts + Velocity, I couldn't submit 1 form with unicode information! :( Did you set the page directive in you JSP files like this? <%@ page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%> Pham Anh Tuan wrote: Sorry all you, I don't intend to flood the mailling list, but yesterday, after I had sent this email, mail server feedback to me that my email couldn't send :( ... So, that the reason why I sent this email so many times, sorry all :( about my situation, I can only save unicode characters into my DB with the form which has the header contains the attribute: enctype="multipart/form-data", if not I can not have unicode characters :( @ Tinh: I did the same thing like you suggested, make a filter and set "request.setCharacterEncoding(encoding);" but as you know, the result was there's no effect :( .. .it's still ISO-8859-1. if you must change encoding for every string ... hiz, that's a heavy work ... is there's any solution :( thanks all, - Original Message - From: "Truong Xuan Tinh" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" Sent: Tuesday, June 20, 2006 10:23 PM Subject: Re: [HELP] I use struts + Velocity, I couldn't submit 1 form with unicode information! :( Hi Tuan, Did you set the page encoding to UTF-8? And one more thing, set the characterEncoding of your request to UTF-8 before it hit your action (ie, in a filter or something like that). PS: I've found a bug in Tomcat with when encoding data to UTF-8 with the GET method (the POST method is OK). Although you set the characterEncoding of the request to UTF-8 in filter, but when it hit the action of Struts, the character is still in ISO-8859-1 :-( . Here is the quick fit for this: byte[] temp = originalString.getBytes("ISO-8859-1"); String result = new String (temp, "UTF8"); Hope this may help. PS: Do not flood the mailing list with duplicate message, you'll get ignored quickly. Pham Anh Tuan wrote: Hi all, I use Struts framework + Velocity, and I have a form with a text field, something like below: in velocity.properties file, I set: input.encoding=UTF-8 output.encoding=UTF-8 hiz, but with all above, I couldn't save unicode value of something property into my DB (Mysql 4.1, I had set all utf-8) :( but ... when I change the header of form tag like below, everything is fine, it's mean, I can save unicode value into DB :( ... I don't know why, help me plz :( thanks in advance, bowlkhin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [HELP] I use struts + Velocity, I couldn't submit 1 form with unicode information! :(
Did you set the page directive in you JSP files like this? <%@ page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%> Pham Anh Tuan wrote: > Sorry all you, > > I don't intend to flood the mailling list, but yesterday, after I had > sent this email, mail server feedback to me that my email couldn't > send :( ... So, that the reason why I sent this email so many times, > sorry all :( > > about my situation, I can only save unicode characters into my DB with > the form which has the header contains the attribute: > enctype="multipart/form-data", if not I can not have unicode > characters :( > > @ Tinh: I did the same thing like you suggested, make a filter and set > "request.setCharacterEncoding(encoding);" but as you know, the result > was there's no effect :( .. .it's still ISO-8859-1. > > if you must change encoding for every string ... hiz, that's a heavy > work ... is there's any solution :( > > thanks all, > - Original Message - From: "Truong Xuan Tinh" > <[EMAIL PROTECTED]> > To: "Struts Users Mailing List" > Sent: Tuesday, June 20, 2006 10:23 PM > Subject: Re: [HELP] I use struts + Velocity, I couldn't submit 1 form > with unicode information! :( > > >> Hi Tuan, >>Did you set the page encoding to UTF-8? And one more thing, set the >> characterEncoding of your request to UTF-8 before it hit your action >> (ie, in a filter or something like that). >> PS: I've found a bug in Tomcat with when encoding data to UTF-8 with the >> GET method (the POST method is OK). Although you set the >> characterEncoding of the request to UTF-8 in filter, but when it hit the >> action of Struts, the character is still in ISO-8859-1 :-( . Here is the >> quick fit for this: >> byte[] temp = originalString.getBytes("ISO-8859-1"); >> String result = new String (temp, "UTF8"); >> Hope this may help. >> PS: Do not flood the mailing list with duplicate message, you'll get >> ignored quickly. >> Pham Anh Tuan wrote: >>> Hi all, >>> >>> I use Struts framework + Velocity, and I have a form with a text >>> field, something like below: >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> in velocity.properties file, I set: >>> >>> input.encoding=UTF-8 >>> output.encoding=UTF-8 >>> hiz, but with all above, I couldn't save unicode value of something >>> property into my DB (Mysql 4.1, I had set all utf-8) :( >>> >>> but ... when I change the header of form tag like below, everything >>> is fine, it's mean, I can save unicode value into DB :( ... I don't >>> know why, help me plz :( >>> >>> >> action="$link.setAction("/saveIt")"> >>> >>> thanks in advance, >>> >>> bowlkhin >>> >>> >> >> >> - >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [HELP] I use struts + Velocity, I couldn't submit 1 form with unicode information! :(
Sorry all you, I don't intend to flood the mailling list, but yesterday, after I had sent this email, mail server feedback to me that my email couldn't send :( ... So, that the reason why I sent this email so many times, sorry all :( about my situation, I can only save unicode characters into my DB with the form which has the header contains the attribute: enctype="multipart/form-data", if not I can not have unicode characters :( @ Tinh: I did the same thing like you suggested, make a filter and set "request.setCharacterEncoding(encoding);" but as you know, the result was there's no effect :( .. .it's still ISO-8859-1. if you must change encoding for every string ... hiz, that's a heavy work ... is there's any solution :( thanks all, - Original Message - From: "Truong Xuan Tinh" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" Sent: Tuesday, June 20, 2006 10:23 PM Subject: Re: [HELP] I use struts + Velocity, I couldn't submit 1 form with unicode information! :( Hi Tuan, Did you set the page encoding to UTF-8? And one more thing, set the characterEncoding of your request to UTF-8 before it hit your action (ie, in a filter or something like that). PS: I've found a bug in Tomcat with when encoding data to UTF-8 with the GET method (the POST method is OK). Although you set the characterEncoding of the request to UTF-8 in filter, but when it hit the action of Struts, the character is still in ISO-8859-1 :-( . Here is the quick fit for this: byte[] temp = originalString.getBytes("ISO-8859-1"); String result = new String (temp, "UTF8"); Hope this may help. PS: Do not flood the mailing list with duplicate message, you'll get ignored quickly. Pham Anh Tuan wrote: Hi all, I use Struts framework + Velocity, and I have a form with a text field, something like below: in velocity.properties file, I set: input.encoding=UTF-8 output.encoding=UTF-8 hiz, but with all above, I couldn't save unicode value of something property into my DB (Mysql 4.1, I had set all utf-8) :( but ... when I change the header of form tag like below, everything is fine, it's mean, I can save unicode value into DB :( ... I don't know why, help me plz :( action="$link.setAction("/saveIt")"> thanks in advance, bowlkhin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[HELP] I use struts + Velocity, I couldn't submit 1 form with unicode information! :(
Hi all, I use Struts framework + Velocity, and I have a form with a text field, something like below: in velocity.properties file, I set: input.encoding=UTF-8 output.encoding=UTF-8 hiz, but with all above, I couldn't save unicode value of something property into my DB (Mysql 4.1, I had set all utf-8) :( but ... when I change the header of form tag like below, everything is fine, it's mean, I can save unicode value into DB :( ... I don't know why, help me plz :( action="$link.setAction("/saveIt")"> thanks in advance, bowlkhin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[HELP] I use struts + Velocity, I couldn't submit 1 form with unicode information! :(
Hi all, I use Struts framework + Velocity, and I have a form with a text field, something like below: in velocity.properties file, I set: input.encoding=UTF-8 output.encoding=UTF-8 hiz, but with all above, I couldn't save unicode value of something property into my DB (Mysql 4.1, I had set all utf-8) :( but ... when I change the header of form tag like below, everything is fine, it's mean, I can save unicode value into DB :( ... I don't know why, help me plz :( thanks in advance, bowlkhin
Re: [HELP] I use struts + Velocity, I couldn't submit 1 form with unicode information! :(
Hi Tuan, Did you set the page encoding to UTF-8? And one more thing, set the characterEncoding of your request to UTF-8 before it hit your action (ie, in a filter or something like that). PS: I've found a bug in Tomcat with when encoding data to UTF-8 with the GET method (the POST method is OK). Although you set the characterEncoding of the request to UTF-8 in filter, but when it hit the action of Struts, the character is still in ISO-8859-1 :-( . Here is the quick fit for this: byte[] temp = originalString.getBytes("ISO-8859-1"); String result = new String (temp, "UTF8"); Hope this may help. PS: Do not flood the mailing list with duplicate message, you'll get ignored quickly. Pham Anh Tuan wrote: > Hi all, > > I use Struts framework + Velocity, and I have a form with a text field, > something like below: > > > > > > > > > > > > in velocity.properties file, I set: > > input.encoding=UTF-8 > output.encoding=UTF-8 > hiz, but with all above, I couldn't save unicode value of something property > into my DB (Mysql 4.1, I had set all utf-8) :( > > but ... when I change the header of form tag like below, everything is fine, > it's mean, I can save unicode value into DB :( ... I don't know why, help me > plz :( > > action="$link.setAction("/saveIt")"> > > thanks in advance, > > bowlkhin > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [HELP] I use struts + Velocity, I couldn't submit 1 form with unicode information! :(
First of all, do you think that posting your thread FOUR TIMES it will be read better than only one? It is a rude behaviour and you are discouraged to do so. Anyway, because I am not evil I will try to help you. Pham Anh Tuan ha scritto: Hi all, I use Struts framework + Velocity, and I have a form with a text field, something like below: in velocity.properties file, I set: input.encoding=UTF-8 output.encoding=UTF-8 hiz, but with all above, I couldn't save unicode value of something property into my DB (Mysql 4.1, I had set all utf-8) :( but ... when I change the header of form tag like below, everything is fine, it's mean, I can save unicode value into DB :( ... I don't know why, help me plz :( Do you mean that you cannot save unicode special characters both with default enctype and with enctype="multipart/form-data"? Or you cannot save them only with enctype=form-data? Antonio - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[HELP] I use struts + Velocity, I couldn't submit 1 form with unicode information! :(
Hi all, I use Struts framework + Velocity, and I have a form with a text field, something like below: in velocity.properties file, I set: input.encoding=UTF-8 output.encoding=UTF-8 hiz, but with all above, I couldn't save unicode value of something property into my DB (Mysql 4.1, I had set all utf-8) :( but ... when I change the header of form tag like below, everything is fine, it's mean, I can save unicode value into DB :( ... I don't know why, help me plz :( action="$link.setAction("/saveIt")"> thanks in advance, bowlkhin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[HELP] I use struts + Velocity, I couldn't submit 1 form with unicode information! :(
Hi all, I use Struts framework + Velocity, and I have a form with a text field, something like below: in velocity.properties file, I set: input.encoding=UTF-8 output.encoding=UTF-8 hiz, but with all above, I couldn't save unicode value of something property into my DB (Mysql 4.1, I had set all utf-8) :( but ... when I change the header of form tag like below, everything is fine, it's mean, I can save unicode value into DB :( ... I don't know why, help me plz :( thanks in advance, bowlkhin
[HELP] I use struts + Velocity, I couldn't submit 1 form with unicode information! :(
Hi all, I use Struts framework + Velocity, and I have a form with a text field, something like below: in velocity.properties file, I set: input.encoding=UTF-8 output.encoding=UTF-8 hiz, but with all above, I couldn't save unicode value of something property into my DB (Mysql 4.1, I had set all utf-8) :( but ... when I change the header of form tag like below, everything is fine, it's mean, I can save unicode value into DB :( ... I don't know why, help me plz :( thanks in advance, bowlkhin
[HELP] I use struts + Velocity, I couldn't submit 1 form with unicode information! :(
Hi all, I use Struts framework + Velocity, and I have a form with a text field, something like below: in velocity.properties file, I set: input.encoding=UTF-8 output.encoding=UTF-8 hiz, but with all above, I couldn't save unicode value of something property into my DB (Mysql 4.1, I had set all utf-8) :( but ... when I change the header of form tag like below, everything is fine, it's mean, I can save unicode value into DB :( ... I don't know why, help me plz :( thanks in advance, bowlkhin