charset problem

Help
timeey
2010-12-10
2012-12-13
  • timeey

    timeey - 2010-12-10

    Hi,

    would u be so kind and write us how to set up jallinone-tomcat-mysql to show ČčĆ抚ĐĐŽž characters (windows-1250 or charset=iso-8859-2). Im trying for days without any success.

    Please help.
    Thanks.

     
  • Andrew Subbotin

    Andrew Subbotin - 2010-12-10

    I recommend that you use UTF-8 instead of win-1250. In this case, only need to specify the character set (UTF-8) during the creation of databases MySQL, and charset tomcat and jallinone (as all applications java) is UTF-8 by default.

     
  • timeey

    timeey - 2010-12-11

    I tried this but stil nothing…thanks for ur post. Please help….

     
  • Andrew Subbotin

    Andrew Subbotin - 2010-12-11

    Try to connect to the demo version jallinone and save a couple of records with symbols ČčĆ抚Đ𮾠in any table, and then check whether the correct display saved records. Address found on the main page of project. About the results, please.

     
  • timeey

    timeey - 2010-12-11

    I tried that….same problem on online demo version…. damn :-)

     
  • timeey

    timeey - 2010-12-11

    I tried on VAT table, VatCode=1010… ŽžŠš is ok, but for ČčĆćĐđ program shows ??????…. any other idea?

     
  • mcarniel

    mcarniel - 2010-12-11

    Demo version of JAllInOne does not use a database having UTF-8 charset, so do not use it to demonstrate that all characters are correctly stored and viewed!
    Anyway, JVM and JAllInOne supports unicode chars, so the only thing to do is to CORRECTLY set utf-8 charset in MySQL instance and AFTER that create a new empty schema that inherits that setting.

     
  • Andrew Subbotin

    Andrew Subbotin - 2010-12-11

    I checked out the characters on a bunch of postgresql-tomcat-jallinone in the UTF-8 - all right, as I expected. So the problem is not in java, and mysql or jdbc driver. If you can not use postgres, then you should start by checking the settings mysql.

     
  • timeey

    timeey - 2010-12-11

    Mysql is correctly configured(UTF-8) - ive use mysql for years…
    When i INSERT(EDIT) record with ČčĆćĐđ via Jallinone, i get ??????. If i enter these chars directly into mysql, all characters are correctly vieved in jallinone.

    Do i have to set up tomcat charset settings?

     
  • Andrew Subbotin

    Andrew Subbotin - 2010-12-12

    mysql-5.1.49+mysql-connector-java-5.1.10-bin.jar+ Apache Tomcat-6.0.20+jallinone-2.4.1(all in UTF-8) + (ČčĆ抚ĐđŽž) = OK

     
  • timeey

    timeey - 2010-12-12

    Damn… where did u set charset settings for Tomcat?

     
  • Goran Cacic

    Goran Cacic - 2010-12-12

    Hi Timeey,

    To my knowledge there is no need to set Tomcat, jdbc driver or jallinone to UTF-8. Are You sure that Your mysql database is utf8 aware. Both character set and (even more important) collation have to be set - utf8_general_ci will probably give You the best results for Croatian.
    If You get into trouble afterwors in setting jallinone database consult previous threds here on how 1000 bytes problem in mysql can be overriden.

    Regards,

    And why do you have the urge for bad french ?-)

     
  • timeey

    timeey - 2010-12-12

    Hey guys, damn,my problem is solwed.

    In pooler.ini in line "url=jdbc\:mysql\://localhost\:3306/jaio" i have added "?characterEncoding=UTF-8&useUnicode=true"
    All chars are correctly viewed.

    But, whats the conclusiton - why i have to add this line?

     
  • timeey

    timeey - 2010-12-13

    http://wiki.apache.org/tomcat/FAQ/CharacterEncoding#Q1

    If a character encoding is not specified, the Servlet specification requires that an encoding of ISO-8859-1 is used. The character encoding for the body of an HTTP message (request or response) is specified in the Content-Type header field. An example of such a header is Content-Type: text/html; charset=ISO-8859-1 which explicitly states that the default (ISO-8859-1) is being used.

     
  • mcarniel

    mcarniel - 2010-12-13

    Default character enconding defined in servlet is a well known issue to all java web developers but… what does it mean? JallInOne does NOT use plain HTTP requests, JAIO is not based on web pages!
    Comunication among client and server tiers is based on java objects serialization via HTTP but servlet request/response encoding is not involved on it.

     
  • timeey

    timeey - 2010-12-14

    Thanks for all your help. Cheers.

    p.s. i installed postgre…jallinone  works fine without "?characterEncoding=UTF-8&useUnicode=true" line in pooler.ini

    t

     

Log in to post a comment.