Re: issue tomcat and special characters
IMO, it's a bad idea to still use Latin-1 these days. The best way is to find out why you can't insert those characters. Well, I don't know why you can't do so. Maybe there's because the MySQL provided by EasyPHP is quite old. By the way, since you use EasyPhp, that implies you're using Windows. You could very well forget about EasyPHP and download an official MySQL. You don't use either Apache or Php from EasyPHP, right? If yes, there's no reason to still keep it. Go here and download the community edition: http://dev.mysql.com/downloads/ While you're there, you could also download the Connector/J. As to configuring MySQL, it's quite intuitive and there's not much to say. I'm making web pages explaining how to make MySQL+Tomcat to work but it's still under construction, so I can't show you. But if you like, here's a little detail (b.d. means you could just choose the parameters by default): After a complete installation of MySQL, there's the Setup Wizard. Skip sign-up if you want next Detailed Configuration (b.d.) next Developer Machine (b.d.) next Multifunctional Database (b.d.) next Tablespace (b.d.) next Decision Support (b.d.) next TCP/IP Strict Mode (b.d.) next Here, you'd better choose Best Support for Multilingualism option next (b.d.) and better choose Include Bin Directory in Path next specify your password and Enable root access from remote machine if you want. That's it! I would suggest you to download the Administrator and Query Browser from the same download page which you would find very useful and intuitive. But their use is off-topic to this mailing-list and to avoid flame, send me private mail if you need more help on them. Seak Seak, Teng-Fong wrote: ary martini wrote: Hi Seak, thank you for your response. 1) mysql has charset Latin I would like to use ISO-8859-1 as encoding, as I can then insert special characters like è and à. For some reason it does not work for UTF-8 in my case Do you know How I can change the charset on mysql? I cannot locate any config file etc. I use Easyphp containing mysql 4.0 Thank you very much for your input Ary - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: issue tomcat and special characters
On what encoding is your MySQL configured? ISO-8859-1 or UTF-8? Those Ãx means that your characters are in UTF-8. Somehow, something in your program sends UTF-8 to the DB server. I've done a webapp totally in UTF-8 without any problem. But I have to say that I don't have the same config like you. My Tomcat is 5.5.x. Moreover, are you using the correct JDBC driver from MySQL? And the most important of all, my MySQL is 4.1 which supports UTF-8 for the first time, well, if I don't make mistake in understanding this page: http://www.mysql.com/news-and-events/newsletter/2003-02/a000129.html The question is what encoding you'd like to use. If it's UTF-8, which IMO is much easier because JVM is already in Unicode, I could help you. If it's ISO-8859-1, I'm afraid you'd need to do more work to do your conversion here and there. Before making the webapp, I've done a sample Java application, a sort of proof-of-concept, to make that the communication between Java and MySQL dosn't alter information. Maybe you should do so. And what's inside the i18n.jsp? ary martini wrote: Hi Team I am using tomcat 4.1.29 with mysql 4.0 My application runs on tomcat. There is a file includes.inc.jsp on my application which specifies the character setting to ISO-8859-1. Issue: I cannot insert special characters into my database. Example: à , è or ü and ö are inserted as orphan characters like è and ? or à Test: I have changed the charset to UTF-8, it has no effect. For some reason tomcat deafults the encoding. Question How can I check and change the encoding on tomcat? Here an extract from my charset : %@ page language=java errorPage=/error.jsp contentType=text/html; charset=ISO-8859-1% link rel=stylesheet type=text/css media=screen href=/css/formate.css %@ include file=session.inc.jsp % %@ include file=i18n.jsp % %@ include file=declarations.inc.jsp % %@ taglib prefix=c uri=/WEB-INF/tld/c.tld % %@ taglib prefix=h2h uri=/WEB-INF/tld/h2h.tld % Thank you very much Ary - Yahoo! FareChase - Search multiple travel sites in one click. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: issue tomcat and special characters
Hi Seak, thank you for your response. 1) mysql has charset Latin I would like to use ISO-8859-1 as encoding, as I can then insert special characters like è and à. For some reason it does not work for UTF-8 in my case Do you know How I can change the charset on mysql? I cannot locate any config file etc. I use Easyphp containing mysql 4.0 Thank you very much for your input Ary Seak, Teng-Fong [EMAIL PROTECTED] wrote: On what encoding is your MySQL configured? ISO-8859-1 or UTF-8? Those Ãx means that your characters are in UTF-8. Somehow, something in your program sends UTF-8 to the DB server. I've done a webapp totally in UTF-8 without any problem. But I have to say that I don't have the same config like you. My Tomcat is 5.5.x. Moreover, are you using the correct JDBC driver from MySQL? And the most important of all, my MySQL is 4.1 which supports UTF-8 for the first time, well, if I don't make mistake in understanding this page: http://www.mysql.com/news-and-events/newsletter/2003-02/a000129.html The question is what encoding you'd like to use. If it's UTF-8, which IMO is much easier because JVM is already in Unicode, I could help you. If it's ISO-8859-1, I'm afraid you'd need to do more work to do your conversion here and there. Before making the webapp, I've done a sample Java application, a sort of proof-of-concept, to make that the communication between Java and MySQL dosn't alter information. Maybe you should do so. And what's inside the i18n.jsp? ary martini wrote: Hi Team I am using tomcat 4.1.29 with mysql 4.0 My application runs on tomcat. There is a file includes.inc.jsp on my application which specifies the character setting to ISO-8859-1. Issue: I cannot insert special characters into my database. Example: à , è or ü and ö are inserted as orphan characters like è and ? or à Test: I have changed the charset to UTF-8, it has no effect. For some reason tomcat deafults the encoding. Question How can I check and change the encoding on tomcat? Here an extract from my charset : Thank you very much Ary - Yahoo! FareChase - Search multiple travel sites in one click. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Yahoo! FareChase - Search multiple travel sites in one click.