Re: i18n - Chinese charactor problem
Hi Zyd, I am using the same version as you and that code works for me. I just ran it. Are you trying it in a new database? Perhaps in an old database in an old version it won't work. BTW if this doesn't resolve it, perhaps you should email me off-list or go the [EMAIL PROTECTED] since it's completely off-topic for struts now. Adam On 10/19/2003 04:01 PM ZYD wrote: It's said version4.1 supports unicode, my MySQL version: 4.1.0-alpha-max-nt, but I cannot execute the following: CREATE TABLE unicodetable ( myrow VARCHAR(200) ) CHARACTER SET UTF8; ERROR 1115: Unknown character set: 'UTF8' connection url is: drivers=org.gjt.mm.mysql.Driver mysql.url=jdbc:mysql://localhost:3306/CoderPool?user=rootpassword=useUnicode=truecharacterEncoding=UTF-8 mysql-connector-java-3.0.9-stable-bin.jar is in F:\Program Files\Apache Group\Tomcat 4.1\common\lib When I write chinese charactor to MySQL, it's not working properly. - Original Message - From: Adam Hardy [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Monday, October 20, 2003 12:09 AM Subject: Re: i18n - Chinese charactor problem What version of mySQL do you have? I believe that complete unicode support is only present in the latest perhaps even beta versions. Adam On 10/18/2003 07:43 PM ZYD wrote: No, UTF-8 does not work. - Original Message - From: Adam Hardy [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Friday, October 17, 2003 4:49 PM Subject: Re: i18n - Chinese charactor problem UTF-8 On 10/16/2003 07:25 PM ZYD wrote: Now I use UTF-8 everywhere instead of gb2312, this problem is gone. Thanks for your help. I have another problem, hope can get some advice from you: I used the following url to connect to MySQL: mysql.url=jdbc:mysql://localhost:3306/CoderPool?user=rootpassword=useUnicode=truecharacterEncoding=GB2312 use GB2312 in this string is not a good idea I think. Then what should the characterEncoding be? -bruce - Original Message - From: Jason Lea [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Friday, October 17, 2003 11:34 AM Subject: Re: i18n - Chinese charactor problem If you are using UTF-8 everywhere it should work - I use it for english Japanese and it works. You mentioned in another message you had this: filter-classSetCharacterEncodingFilter/filter-class init-param param-nameencoding/param-name param-valueGB2312/param-value Are you still using that? or UTF-8? Everything has to match. ZYD wrote: Hi Jason, Thank you for your response. I did exactly the same thing as the article said, but still, not working properly. Chinese can be displayed, but not in the text box. If I change %@ page contentType=text/html; charset=UTF-8 % to %@ page contentType=text/html; charset=GBK % then the Chinese charactors are handled properly. Why is that? - Original Message - From: Jason Lea [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Friday, October 17, 2003 5:51 AM Subject: Re: i18n - Chinese charactor problem Here is a link that explains what is needed and a filter to do it... http://www.anassina.com/struts/i18n/i18n.html Greg Reddin wrote: I don't remember the exact code, but a looong time ago we had to write a Filter that created a request wrapper that properly set the character encoding on request parameters. Maybe googling that would turn up something. Greg ZYD wrote: Hi, I have a problem in getting the Chinese charactors from html:text, The following is my jsp file: %@ page contentType=text/html;charset=UTF-8 language=java % %@ taglib uri=/WEB-INF/struts-html.tld prefix=html % html:html html:form action=/submit focus=email head/head body html:text property=email/ html:submitbean:message key=button.logon//html:submit /body /html:form /html:html - I have two property files, one is for englisn, the other is for chinese. Both english and chinese can be displayed properly on the page, except in the text box. When I input chinese charactors in the text box and submit, I cannot get the chinese charactor in the form bean correctly. The chinese charactors become some unreadable charactors like . There are no special process in the getEmail and setEmail method in the form bean. Does anybody have similar problem? I need your advice. Any response is appreciated. -- -- struts 1.1 + tomcat 5.0.12 + java 1.4.2 Linux 2.4.20 RH9 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: i18n - Chinese charactor problem
What version of mySQL do you have? I believe that complete unicode support is only present in the latest perhaps even beta versions. Adam On 10/18/2003 07:43 PM ZYD wrote: No, UTF-8 does not work. - Original Message - From: Adam Hardy [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Friday, October 17, 2003 4:49 PM Subject: Re: i18n - Chinese charactor problem UTF-8 On 10/16/2003 07:25 PM ZYD wrote: Now I use UTF-8 everywhere instead of gb2312, this problem is gone. Thanks for your help. I have another problem, hope can get some advice from you: I used the following url to connect to MySQL: mysql.url=jdbc:mysql://localhost:3306/CoderPool?user=rootpassword=useUnicode=truecharacterEncoding=GB2312 use GB2312 in this string is not a good idea I think. Then what should the characterEncoding be? -bruce - Original Message - From: Jason Lea [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Friday, October 17, 2003 11:34 AM Subject: Re: i18n - Chinese charactor problem If you are using UTF-8 everywhere it should work - I use it for english Japanese and it works. You mentioned in another message you had this: filter-classSetCharacterEncodingFilter/filter-class init-param param-nameencoding/param-name param-valueGB2312/param-value Are you still using that? or UTF-8? Everything has to match. ZYD wrote: Hi Jason, Thank you for your response. I did exactly the same thing as the article said, but still, not working properly. Chinese can be displayed, but not in the text box. If I change %@ page contentType=text/html; charset=UTF-8 % to %@ page contentType=text/html; charset=GBK % then the Chinese charactors are handled properly. Why is that? - Original Message - From: Jason Lea [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Friday, October 17, 2003 5:51 AM Subject: Re: i18n - Chinese charactor problem Here is a link that explains what is needed and a filter to do it... http://www.anassina.com/struts/i18n/i18n.html Greg Reddin wrote: I don't remember the exact code, but a looong time ago we had to write a Filter that created a request wrapper that properly set the character encoding on request parameters. Maybe googling that would turn up something. Greg ZYD wrote: Hi, I have a problem in getting the Chinese charactors from html:text, The following is my jsp file: %@ page contentType=text/html;charset=UTF-8 language=java % %@ taglib uri=/WEB-INF/struts-html.tld prefix=html % html:html html:form action=/submit focus=email head/head body html:text property=email/ html:submitbean:message key=button.logon//html:submit /body /html:form /html:html - I have two property files, one is for englisn, the other is for chinese. Both english and chinese can be displayed properly on the page, except in the text box. When I input chinese charactors in the text box and submit, I cannot get the chinese charactor in the form bean correctly. The chinese charactors become some unreadable charactors like . There are no special process in the getEmail and setEmail method in the form bean. Does anybody have similar problem? I need your advice. Any response is appreciated. -- -- struts 1.1 + tomcat 5.0.12 + java 1.4.2 Linux 2.4.20 RH9 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: i18n - Chinese charactor problem
Wich jdbc driver for mySQL are U using? It works fine to me mysql-connector-java-3.0.8 for Greeks - Original Message - From: Adam Hardy [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Sunday, October 19, 2003 7:09 PM Subject: Re: i18n - Chinese charactor problem What version of mySQL do you have? I believe that complete unicode support is only present in the latest perhaps even beta versions. Adam On 10/18/2003 07:43 PM ZYD wrote: No, UTF-8 does not work. - Original Message - From: Adam Hardy [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Friday, October 17, 2003 4:49 PM Subject: Re: i18n - Chinese charactor problem UTF-8 On 10/16/2003 07:25 PM ZYD wrote: Now I use UTF-8 everywhere instead of gb2312, this problem is gone. Thanks for your help. I have another problem, hope can get some advice from you: I used the following url to connect to MySQL: mysql.url=jdbc:mysql://localhost:3306/CoderPool?user=rootpassword=useUn icode=truecharacterEncoding=GB2312 use GB2312 in this string is not a good idea I think. Then what should the characterEncoding be? -bruce - Original Message - From: Jason Lea [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Friday, October 17, 2003 11:34 AM Subject: Re: i18n - Chinese charactor problem If you are using UTF-8 everywhere it should work - I use it for english Japanese and it works. You mentioned in another message you had this: filter-classSetCharacterEncodingFilter/filter-class init-param param-nameencoding/param-name param-valueGB2312/param-value Are you still using that? or UTF-8? Everything has to match. ZYD wrote: Hi Jason, Thank you for your response. I did exactly the same thing as the article said, but still, not working properly. Chinese can be displayed, but not in the text box. If I change %@ page contentType=text/html; charset=UTF-8 % to %@ page contentType=text/html; charset=GBK % then the Chinese charactors are handled properly. Why is that? - Original Message - From: Jason Lea [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Friday, October 17, 2003 5:51 AM Subject: Re: i18n - Chinese charactor problem Here is a link that explains what is needed and a filter to do it... http://www.anassina.com/struts/i18n/i18n.html Greg Reddin wrote: I don't remember the exact code, but a looong time ago we had to write a Filter that created a request wrapper that properly set the character encoding on request parameters. Maybe googling that would turn up something. Greg ZYD wrote: Hi, I have a problem in getting the Chinese charactors from html:text, The following is my jsp file: %@ page contentType=text/html;charset=UTF-8 language=java % %@ taglib uri=/WEB-INF/struts-html.tld prefix=html % html:html html:form action=/submit focus=email head/head body html:text property=email/ html:submitbean:message key=button.logon//html:submit /body /html:form /html:html - I have two property files, one is for englisn, the other is for chinese. Both english and chinese can be displayed properly on the page, except in the text box. When I input chinese charactors in the text box and submit, I cannot get the chinese charactor in the form bean correctly. The chinese charactors become some unreadable charactors like . There are no special process in the getEmail and setEmail method in the form bean. Does anybody have similar problem? I need your advice. Any response is appreciated. -- -- struts 1.1 + tomcat 5.0.12 + java 1.4.2 Linux 2.4.20 RH9 - 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: i18n - Chinese charactor problem
MySQL version: 4.1.0-alpha-max-nt, connection url is: drivers=org.gjt.mm.mysql.Driver mysql.url=jdbc:mysql://localhost:3306/CoderPool?user=rootpassword=useUnicode=truecharacterEncoding=UTF-8 mysql-connector-java-3.0.9-stable-bin.jar is in F:\Program Files\Apache Group\Tomcat 4.1\common\lib When I write chinese charactor to MySQL, it's not working properly. - Original Message - From: Adam Hardy [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Monday, October 20, 2003 12:09 AM Subject: Re: i18n - Chinese charactor problem What version of mySQL do you have? I believe that complete unicode support is only present in the latest perhaps even beta versions. Adam On 10/18/2003 07:43 PM ZYD wrote: No, UTF-8 does not work. - Original Message - From: Adam Hardy [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Friday, October 17, 2003 4:49 PM Subject: Re: i18n - Chinese charactor problem UTF-8 On 10/16/2003 07:25 PM ZYD wrote: Now I use UTF-8 everywhere instead of gb2312, this problem is gone. Thanks for your help. I have another problem, hope can get some advice from you: I used the following url to connect to MySQL: mysql.url=jdbc:mysql://localhost:3306/CoderPool?user=rootpassword=useUnicode=truecharacterEncoding=GB2312 use GB2312 in this string is not a good idea I think. Then what should the characterEncoding be? -bruce - Original Message - From: Jason Lea [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Friday, October 17, 2003 11:34 AM Subject: Re: i18n - Chinese charactor problem If you are using UTF-8 everywhere it should work - I use it for english Japanese and it works. You mentioned in another message you had this: filter-classSetCharacterEncodingFilter/filter-class init-param param-nameencoding/param-name param-valueGB2312/param-value Are you still using that? or UTF-8? Everything has to match. ZYD wrote: Hi Jason, Thank you for your response. I did exactly the same thing as the article said, but still, not working properly. Chinese can be displayed, but not in the text box. If I change %@ page contentType=text/html; charset=UTF-8 % to %@ page contentType=text/html; charset=GBK % then the Chinese charactors are handled properly. Why is that? - Original Message - From: Jason Lea [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Friday, October 17, 2003 5:51 AM Subject: Re: i18n - Chinese charactor problem Here is a link that explains what is needed and a filter to do it... http://www.anassina.com/struts/i18n/i18n.html Greg Reddin wrote: I don't remember the exact code, but a looong time ago we had to write a Filter that created a request wrapper that properly set the character encoding on request parameters. Maybe googling that would turn up something. Greg ZYD wrote: Hi, I have a problem in getting the Chinese charactors from html:text, The following is my jsp file: %@ page contentType=text/html;charset=UTF-8 language=java % %@ taglib uri=/WEB-INF/struts-html.tld prefix=html % html:html html:form action=/submit focus=email head/head body html:text property=email/ html:submitbean:message key=button.logon//html:submit /body /html:form /html:html - I have two property files, one is for englisn, the other is for chinese. Both english and chinese can be displayed properly on the page, except in the text box. When I input chinese charactors in the text box and submit, I cannot get the chinese charactor in the form bean correctly. The chinese charactors become some unreadable charactors like . There are no special process in the getEmail and setEmail method in the form bean. Does anybody have similar problem? I need your advice. Any response is appreciated. -- -- struts 1.1 + tomcat 5.0.12 + java 1.4.2 Linux 2.4.20 RH9 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: i18n - Chinese charactor problem
I use mysql-connector-java-3.0.9-stable-bin.jar, it is in F:\Program Files\Apache Group\Tomcat 4.1\common\lib MySQL version: 4.1.0-alpha-max-nt, connection url is: drivers=org.gjt.mm.mysql.Driver mysql.url=jdbc:mysql://localhost:3306/CoderPool?user=rootpassword=useUnicode=truecharacterEncoding=UTF-8 Not works fine. - Original Message - From: Jim Theodoridis [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Monday, October 20, 2003 12:27 AM Subject: Re: i18n - Chinese charactor problem Wich jdbc driver for mySQL are U using? It works fine to me mysql-connector-java-3.0.8 for Greeks - Original Message - From: Adam Hardy [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Sunday, October 19, 2003 7:09 PM Subject: Re: i18n - Chinese charactor problem What version of mySQL do you have? I believe that complete unicode support is only present in the latest perhaps even beta versions. Adam On 10/18/2003 07:43 PM ZYD wrote: No, UTF-8 does not work. - Original Message - From: Adam Hardy [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Friday, October 17, 2003 4:49 PM Subject: Re: i18n - Chinese charactor problem UTF-8 On 10/16/2003 07:25 PM ZYD wrote: Now I use UTF-8 everywhere instead of gb2312, this problem is gone. Thanks for your help. I have another problem, hope can get some advice from you: I used the following url to connect to MySQL: mysql.url=jdbc:mysql://localhost:3306/CoderPool?user=rootpassword=useUn icode=truecharacterEncoding=GB2312 use GB2312 in this string is not a good idea I think. Then what should the characterEncoding be? -bruce - Original Message - From: Jason Lea [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Friday, October 17, 2003 11:34 AM Subject: Re: i18n - Chinese charactor problem If you are using UTF-8 everywhere it should work - I use it for english Japanese and it works. You mentioned in another message you had this: filter-classSetCharacterEncodingFilter/filter-class init-param param-nameencoding/param-name param-valueGB2312/param-value Are you still using that? or UTF-8? Everything has to match. ZYD wrote: Hi Jason, Thank you for your response. I did exactly the same thing as the article said, but still, not working properly. Chinese can be displayed, but not in the text box. If I change %@ page contentType=text/html; charset=UTF-8 % to %@ page contentType=text/html; charset=GBK % then the Chinese charactors are handled properly. Why is that? - Original Message - From: Jason Lea [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Friday, October 17, 2003 5:51 AM Subject: Re: i18n - Chinese charactor problem Here is a link that explains what is needed and a filter to do it... http://www.anassina.com/struts/i18n/i18n.html Greg Reddin wrote: I don't remember the exact code, but a looong time ago we had to write a Filter that created a request wrapper that properly set the character encoding on request parameters. Maybe googling that would turn up something. Greg ZYD wrote: Hi, I have a problem in getting the Chinese charactors from html:text, The following is my jsp file: %@ page contentType=text/html;charset=UTF-8 language=java % %@ taglib uri=/WEB-INF/struts-html.tld prefix=html % html:html html:form action=/submit focus=email head/head body html:text property=email/ html:submitbean:message key=button.logon//html:submit /body /html:form /html:html - I have two property files, one is for englisn, the other is for chinese. Both english and chinese can be displayed properly on the page, except in the text box. When I input chinese charactors in the text box and submit, I cannot get the chinese charactor in the form bean correctly. The chinese charactors become some unreadable charactors like . There are no special process in the getEmail and setEmail method in the form bean. Does anybody have similar problem? I need your advice. Any response is appreciated. -- -- struts 1.1 + tomcat 5.0.12 + java 1.4.2 Linux 2.4.20 RH9 - 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: i18n - Chinese charactor problem
It's said version4.1 supports unicode, my MySQL version: 4.1.0-alpha-max-nt, but I cannot execute the following: CREATE TABLE unicodetable ( myrow VARCHAR(200) ) CHARACTER SET UTF8; ERROR 1115: Unknown character set: 'UTF8' connection url is: drivers=org.gjt.mm.mysql.Driver mysql.url=jdbc:mysql://localhost:3306/CoderPool?user=rootpassword=useUnicode=truecharacterEncoding=UTF-8 mysql-connector-java-3.0.9-stable-bin.jar is in F:\Program Files\Apache Group\Tomcat 4.1\common\lib When I write chinese charactor to MySQL, it's not working properly. - Original Message - From: Adam Hardy [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Monday, October 20, 2003 12:09 AM Subject: Re: i18n - Chinese charactor problem What version of mySQL do you have? I believe that complete unicode support is only present in the latest perhaps even beta versions. Adam On 10/18/2003 07:43 PM ZYD wrote: No, UTF-8 does not work. - Original Message - From: Adam Hardy [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Friday, October 17, 2003 4:49 PM Subject: Re: i18n - Chinese charactor problem UTF-8 On 10/16/2003 07:25 PM ZYD wrote: Now I use UTF-8 everywhere instead of gb2312, this problem is gone. Thanks for your help. I have another problem, hope can get some advice from you: I used the following url to connect to MySQL: mysql.url=jdbc:mysql://localhost:3306/CoderPool?user=rootpassword=useUnicode=truecharacterEncoding=GB2312 use GB2312 in this string is not a good idea I think. Then what should the characterEncoding be? -bruce - Original Message - From: Jason Lea [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Friday, October 17, 2003 11:34 AM Subject: Re: i18n - Chinese charactor problem If you are using UTF-8 everywhere it should work - I use it for english Japanese and it works. You mentioned in another message you had this: filter-classSetCharacterEncodingFilter/filter-class init-param param-nameencoding/param-name param-valueGB2312/param-value Are you still using that? or UTF-8? Everything has to match. ZYD wrote: Hi Jason, Thank you for your response. I did exactly the same thing as the article said, but still, not working properly. Chinese can be displayed, but not in the text box. If I change %@ page contentType=text/html; charset=UTF-8 % to %@ page contentType=text/html; charset=GBK % then the Chinese charactors are handled properly. Why is that? - Original Message - From: Jason Lea [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Friday, October 17, 2003 5:51 AM Subject: Re: i18n - Chinese charactor problem Here is a link that explains what is needed and a filter to do it... http://www.anassina.com/struts/i18n/i18n.html Greg Reddin wrote: I don't remember the exact code, but a looong time ago we had to write a Filter that created a request wrapper that properly set the character encoding on request parameters. Maybe googling that would turn up something. Greg ZYD wrote: Hi, I have a problem in getting the Chinese charactors from html:text, The following is my jsp file: %@ page contentType=text/html;charset=UTF-8 language=java % %@ taglib uri=/WEB-INF/struts-html.tld prefix=html % html:html html:form action=/submit focus=email head/head body html:text property=email/ html:submitbean:message key=button.logon//html:submit /body /html:form /html:html - I have two property files, one is for englisn, the other is for chinese. Both english and chinese can be displayed properly on the page, except in the text box. When I input chinese charactors in the text box and submit, I cannot get the chinese charactor in the form bean correctly. The chinese charactors become some unreadable charactors like . There are no special process in the getEmail and setEmail method in the form bean. Does anybody have similar problem? I need your advice. Any response is appreciated. -- -- struts 1.1 + tomcat 5.0.12 + java 1.4.2 Linux 2.4.20 RH9 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: i18n - Chinese charactor problem
No, UTF-8 does not work. - Original Message - From: Adam Hardy [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Friday, October 17, 2003 4:49 PM Subject: Re: i18n - Chinese charactor problem UTF-8 On 10/16/2003 07:25 PM ZYD wrote: Now I use UTF-8 everywhere instead of gb2312, this problem is gone. Thanks for your help. I have another problem, hope can get some advice from you: I used the following url to connect to MySQL: mysql.url=jdbc:mysql://localhost:3306/CoderPool?user=rootpassword=useUnicode=truecharacterEncoding=GB2312 use GB2312 in this string is not a good idea I think. Then what should the characterEncoding be? -bruce - Original Message - From: Jason Lea [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Friday, October 17, 2003 11:34 AM Subject: Re: i18n - Chinese charactor problem If you are using UTF-8 everywhere it should work - I use it for english Japanese and it works. You mentioned in another message you had this: filter-classSetCharacterEncodingFilter/filter-class init-param param-nameencoding/param-name param-valueGB2312/param-value Are you still using that? or UTF-8? Everything has to match. ZYD wrote: Hi Jason, Thank you for your response. I did exactly the same thing as the article said, but still, not working properly. Chinese can be displayed, but not in the text box. If I change %@ page contentType=text/html; charset=UTF-8 % to %@ page contentType=text/html; charset=GBK % then the Chinese charactors are handled properly. Why is that? - Original Message - From: Jason Lea [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Friday, October 17, 2003 5:51 AM Subject: Re: i18n - Chinese charactor problem Here is a link that explains what is needed and a filter to do it... http://www.anassina.com/struts/i18n/i18n.html Greg Reddin wrote: I don't remember the exact code, but a looong time ago we had to write a Filter that created a request wrapper that properly set the character encoding on request parameters. Maybe googling that would turn up something. Greg ZYD wrote: Hi, I have a problem in getting the Chinese charactors from html:text, The following is my jsp file: %@ page contentType=text/html;charset=UTF-8 language=java % %@ taglib uri=/WEB-INF/struts-html.tld prefix=html % html:html html:form action=/submit focus=email head/head body html:text property=email/ html:submitbean:message key=button.logon//html:submit /body /html:form /html:html - I have two property files, one is for englisn, the other is for chinese. Both english and chinese can be displayed properly on the page, except in the text box. When I input chinese charactors in the text box and submit, I cannot get the chinese charactor in the form bean correctly. The chinese charactors become some unreadable charactors like . There are no special process in the getEmail and setEmail method in the form bean. Does anybody have similar problem? I need your advice. Any response is appreciated. -- struts 1.1 + tomcat 5.0.12 + java 1.4.2 Linux 2.4.20 RH9 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: i18n - Chinese charactor problem
UTF-8 On 10/16/2003 07:25 PM ZYD wrote: Now I use UTF-8 everywhere instead of gb2312, this problem is gone. Thanks for your help. I have another problem, hope can get some advice from you: I used the following url to connect to MySQL: mysql.url=jdbc:mysql://localhost:3306/CoderPool?user=rootpassword=useUnicode=truecharacterEncoding=GB2312 use GB2312 in this string is not a good idea I think. Then what should the characterEncoding be? -bruce - Original Message - From: Jason Lea [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Friday, October 17, 2003 11:34 AM Subject: Re: i18n - Chinese charactor problem If you are using UTF-8 everywhere it should work - I use it for english Japanese and it works. You mentioned in another message you had this: filter-classSetCharacterEncodingFilter/filter-class init-param param-nameencoding/param-name param-valueGB2312/param-value Are you still using that? or UTF-8? Everything has to match. ZYD wrote: Hi Jason, Thank you for your response. I did exactly the same thing as the article said, but still, not working properly. Chinese can be displayed, but not in the text box. If I change %@ page contentType=text/html; charset=UTF-8 % to %@ page contentType=text/html; charset=GBK % then the Chinese charactors are handled properly. Why is that? - Original Message - From: Jason Lea [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Friday, October 17, 2003 5:51 AM Subject: Re: i18n - Chinese charactor problem Here is a link that explains what is needed and a filter to do it... http://www.anassina.com/struts/i18n/i18n.html Greg Reddin wrote: I don't remember the exact code, but a looong time ago we had to write a Filter that created a request wrapper that properly set the character encoding on request parameters. Maybe googling that would turn up something. Greg ZYD wrote: Hi, I have a problem in getting the Chinese charactors from html:text, The following is my jsp file: %@ page contentType=text/html;charset=UTF-8 language=java % %@ taglib uri=/WEB-INF/struts-html.tld prefix=html % html:html html:form action=/submit focus=email head/head body html:text property=email/ html:submitbean:message key=button.logon//html:submit /body /html:form /html:html - I have two property files, one is for englisn, the other is for chinese. Both english and chinese can be displayed properly on the page, except in the text box. When I input chinese charactors in the text box and submit, I cannot get the chinese charactor in the form bean correctly. The chinese charactors become some unreadable charactors like . There are no special process in the getEmail and setEmail method in the form bean. Does anybody have similar problem? I need your advice. Any response is appreciated. -- struts 1.1 + tomcat 5.0.12 + java 1.4.2 Linux 2.4.20 RH9 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: i18n - Chinese charactor problem
I don't remember the exact code, but a looong time ago we had to write a Filter that created a request wrapper that properly set the character encoding on request parameters. Maybe googling that would turn up something. Greg ZYD wrote: Hi, I have a problem in getting the Chinese charactors from html:text, The following is my jsp file: %@ page contentType=text/html;charset=UTF-8 language=java % %@ taglib uri=/WEB-INF/struts-html.tld prefix=html % html:html html:form action=/submit focus=email head/head body html:text property=email/ html:submitbean:message key=button.logon//html:submit /body /html:form /html:html - I have two property files, one is for englisn, the other is for chinese. Both english and chinese can be displayed properly on the page, except in the text box. When I input chinese charactors in the text box and submit, I cannot get the chinese charactor in the form bean correctly. The chinese charactors become some unreadable charactors like . There are no special process in the getEmail and setEmail method in the form bean. Does anybody have similar problem? I need your advice. Any response is appreciated. --bruce - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: i18n - Chinese charactor problem
Here is a link that explains what is needed and a filter to do it... http://www.anassina.com/struts/i18n/i18n.html Greg Reddin wrote: I don't remember the exact code, but a looong time ago we had to write a Filter that created a request wrapper that properly set the character encoding on request parameters. Maybe googling that would turn up something. Greg ZYD wrote: Hi, I have a problem in getting the Chinese charactors from html:text, The following is my jsp file: %@ page contentType=text/html;charset=UTF-8 language=java % %@ taglib uri=/WEB-INF/struts-html.tld prefix=html % html:html html:form action=/submit focus=email head/head body html:text property=email/ html:submitbean:message key=button.logon//html:submit /body /html:form /html:html - I have two property files, one is for englisn, the other is for chinese. Both english and chinese can be displayed properly on the page, except in the text box. When I input chinese charactors in the text box and submit, I cannot get the chinese charactor in the form bean correctly. The chinese charactors become some unreadable charactors like . There are no special process in the getEmail and setEmail method in the form bean. Does anybody have similar problem? I need your advice. Any response is appreciated. --bruce - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Jason Lea - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: i18n - Chinese charactor problem
Hi Greg, Thank you for your fast response. I do write a filter to set the encoding to GB2312, but if I set the encoding to gb2312 on every page, because this disallow my pages to accept other language charactors, right? Can I set the encoding dynamicly according to user's locale? This is my filter in my web.xml filter filter-nameSet Character Encoding/filter-name filter-classSetCharacterEncodingFilter/filter-class init-param param-nameencoding/param-name param-valueGB2312/param-value /init-param init-param param-nameignore/param-name param-valuetrue/param-value /init-param /filter filter-mapping filter-nameSet Character Encoding/filter-name servlet-nameaction/servlet-name /filter-mapping Thanks again. --bruce - Original Message - From: Greg Reddin [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Friday, October 17, 2003 2:48 AM Subject: Re: i18n - Chinese charactor problem I don't remember the exact code, but a looong time ago we had to write a Filter that created a request wrapper that properly set the character encoding on request parameters. Maybe googling that would turn up something. Greg ZYD wrote: Hi, I have a problem in getting the Chinese charactors from html:text, The following is my jsp file: %@ page contentType=text/html;charset=UTF-8 language=java % %@ taglib uri=/WEB-INF/struts-html.tld prefix=html % html:html html:form action=/submit focus=email head/head body html:text property=email/ html:submitbean:message key=button.logon//html:submit /body /html:form /html:html - I have two property files, one is for englisn, the other is for chinese. Both english and chinese can be displayed properly on the page, except in the text box. When I input chinese charactors in the text box and submit, I cannot get the chinese charactor in the form bean correctly. The chinese charactors become some unreadable charactors like . There are no special process in the getEmail and setEmail method in the form bean. Does anybody have similar problem? I need your advice. Any response is appreciated. --bruce - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: i18n - Chinese charactor problem
Hi Jason, Thank you for your response. I did exactly the same thing as the article said, but still, not working properly. Chinese can be displayed, but not in the text box. If I change %@ page contentType=text/html; charset=UTF-8 % to %@ page contentType=text/html; charset=GBK % then the Chinese charactors are handled properly. Why is that? - Original Message - From: Jason Lea [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Friday, October 17, 2003 5:51 AM Subject: Re: i18n - Chinese charactor problem Here is a link that explains what is needed and a filter to do it... http://www.anassina.com/struts/i18n/i18n.html Greg Reddin wrote: I don't remember the exact code, but a looong time ago we had to write a Filter that created a request wrapper that properly set the character encoding on request parameters. Maybe googling that would turn up something. Greg ZYD wrote: Hi, I have a problem in getting the Chinese charactors from html:text, The following is my jsp file: %@ page contentType=text/html;charset=UTF-8 language=java % %@ taglib uri=/WEB-INF/struts-html.tld prefix=html % html:html html:form action=/submit focus=email head/head body html:text property=email/ html:submitbean:message key=button.logon//html:submit /body /html:form /html:html - I have two property files, one is for englisn, the other is for chinese. Both english and chinese can be displayed properly on the page, except in the text box. When I input chinese charactors in the text box and submit, I cannot get the chinese charactor in the form bean correctly. The chinese charactors become some unreadable charactors like . There are no special process in the getEmail and setEmail method in the form bean. Does anybody have similar problem? I need your advice. Any response is appreciated. --bruce - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Jason Lea - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: i18n - Chinese charactor problem
If you are using UTF-8 everywhere it should work - I use it for english Japanese and it works. You mentioned in another message you had this: filter-classSetCharacterEncodingFilter/filter-class init-param param-nameencoding/param-name param-valueGB2312/param-value Are you still using that? or UTF-8? Everything has to match. ZYD wrote: Hi Jason, Thank you for your response. I did exactly the same thing as the article said, but still, not working properly. Chinese can be displayed, but not in the text box. If I change %@ page contentType=text/html; charset=UTF-8 % to %@ page contentType=text/html; charset=GBK % then the Chinese charactors are handled properly. Why is that? - Original Message - From: Jason Lea [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Friday, October 17, 2003 5:51 AM Subject: Re: i18n - Chinese charactor problem Here is a link that explains what is needed and a filter to do it... http://www.anassina.com/struts/i18n/i18n.html Greg Reddin wrote: I don't remember the exact code, but a looong time ago we had to write a Filter that created a request wrapper that properly set the character encoding on request parameters. Maybe googling that would turn up something. Greg ZYD wrote: Hi, I have a problem in getting the Chinese charactors from html:text, The following is my jsp file: %@ page contentType=text/html;charset=UTF-8 language=java % %@ taglib uri=/WEB-INF/struts-html.tld prefix=html % html:html html:form action=/submit focus=email head/head body html:text property=email/ html:submitbean:message key=button.logon//html:submit /body /html:form /html:html - I have two property files, one is for englisn, the other is for chinese. Both english and chinese can be displayed properly on the page, except in the text box. When I input chinese charactors in the text box and submit, I cannot get the chinese charactor in the form bean correctly. The chinese charactors become some unreadable charactors like . There are no special process in the getEmail and setEmail method in the form bean. Does anybody have similar problem? I need your advice. Any response is appreciated. --bruce - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Jason Lea - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Jason Lea - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: i18n - Chinese charactor problem
Now I use UTF-8 everywhere instead of gb2312, this problem is gone. Thanks for your help. I have another problem, hope can get some advice from you: I used the following url to connect to MySQL: mysql.url=jdbc:mysql://localhost:3306/CoderPool?user=rootpassword=useUnicode=truecharacterEncoding=GB2312 use GB2312 in this string is not a good idea I think. Then what should the characterEncoding be? -bruce - Original Message - From: Jason Lea [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Friday, October 17, 2003 11:34 AM Subject: Re: i18n - Chinese charactor problem If you are using UTF-8 everywhere it should work - I use it for english Japanese and it works. You mentioned in another message you had this: filter-classSetCharacterEncodingFilter/filter-class init-param param-nameencoding/param-name param-valueGB2312/param-value Are you still using that? or UTF-8? Everything has to match. ZYD wrote: Hi Jason, Thank you for your response. I did exactly the same thing as the article said, but still, not working properly. Chinese can be displayed, but not in the text box. If I change %@ page contentType=text/html; charset=UTF-8 % to %@ page contentType=text/html; charset=GBK % then the Chinese charactors are handled properly. Why is that? - Original Message - From: Jason Lea [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Friday, October 17, 2003 5:51 AM Subject: Re: i18n - Chinese charactor problem Here is a link that explains what is needed and a filter to do it... http://www.anassina.com/struts/i18n/i18n.html Greg Reddin wrote: I don't remember the exact code, but a looong time ago we had to write a Filter that created a request wrapper that properly set the character encoding on request parameters. Maybe googling that would turn up something. Greg ZYD wrote: Hi, I have a problem in getting the Chinese charactors from html:text, The following is my jsp file: %@ page contentType=text/html;charset=UTF-8 language=java % %@ taglib uri=/WEB-INF/struts-html.tld prefix=html % html:html html:form action=/submit focus=email head/head body html:text property=email/ html:submitbean:message key=button.logon//html:submit /body /html:form /html:html - I have two property files, one is for englisn, the other is for chinese. Both english and chinese can be displayed properly on the page, except in the text box. When I input chinese charactors in the text box and submit, I cannot get the chinese charactor in the form bean correctly. The chinese charactors become some unreadable charactors like . There are no special process in the getEmail and setEmail method in the form bean. Does anybody have similar problem? I need your advice. Any response is appreciated. --bruce - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Jason Lea - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Jason Lea - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]