Menu

Change charakter encoding to UTF

Saulenas
2015-08-31
2015-09-12
  • Saulenas

    Saulenas - 2015-08-31

    Default is Latin-1 character encoding, but for others languages in linux systems there is problem - how can change default encoding to UTF-8 (utf8_unicode_ci)?

     
  • Wanhive

    Wanhive - 2015-08-31

    With reference to the previous post, please edit:

    web/WEB-INF/classes/schema and change the default charset to UTF-8 (utf8)

     
  • Saulenas

    Saulenas - 2015-08-31

    All databases are UTF8. I think problems my be are in jbcd connector or ESTIMATE.
    I have changed ALL in estimate-2.0.0.war from ISO-8859-1 to UTF-8. Changes schema, change in .jsp and everywhere founded.
    After entering in ESTIMATE lithuanian charakters, entries in ESTIMATE disaapering, but in dabase records are:

    I wrote one letter Ą and in database it looks like square and number 4.
    Image is mysql screenshot

     

    Last edit: Saulenas 2015-08-31
    • Wanhive

      Wanhive - 2015-08-31

      I have found the root of the problem. Javascript is not processing the responseXML cotaining non-english characters correctly. I tried to print the responseText and it prints correctly.

      Source of the problem: web/script/items/assembly/assemblyAction.js (renderAssembly)

      http://stackoverflow.com/questions/2452581/ies-responsexml-getelementsbytagname-unable-to-handle-non-english-character

      Amit

       

      Last edit: Wanhive 2015-08-31
  • Saulenas

    Saulenas - 2015-09-01

    Nope, not this problem.
    I think problems are in parser. Tried to change code .getBytes()); to .getBytes("UTF-8")); but got compilation errors. Recorded two bytes "4".

    Manually wrote directly to table letter "ą". ESTIMATE shows "?" - not recognize symbol, but nothing dissapered.

    Or maybe problem is in jdbc connector. First need to test :)

    update:
    changed in Application.java to:
    "jdbc:mysql://localhost:3306?useUnicode=yes&characterEncoding=utf8"
    Not helped :(

     

    Last edit: Saulenas 2015-09-01
  • Wanhive

    Wanhive - 2015-09-01

    This is not a problem with the connector. The result disappears because javascript refuses to parse the responseXML containing special character. I did the following:

    A. Added a filter to enforce UTF-8 encoding, modified all jsps accordingly.
    B. Changed database's default encoding to utf8
    C. Changed responseXML to responseText and printed it in the browser.

    Please refer to the screenshots attached.

     

    Last edit: Wanhive 2015-09-01
  • Wanhive

    Wanhive - 2015-09-05

    @ Saulenas did you manage to dig out the root cause of the problem? ESTIMATE doesn't have good language support and we would like to build it in future versions, and in that context your feedback will be deepely appreciated.

     
    • Saulenas

      Saulenas - 2015-09-12

      One problem: i am simply advanced computer user, not developer, programmer etc.
      It is too difficult to me to dig out the root cause of problem :(
      Temporally I using ESTIMATE without lithuanian charakters.
      But I can translate ESTIMATE to lithuanian. I think simpliest way is to use .xml (or other file) with translation. Content of file LANGUAGE_LT.XML:

      Projects = Projektai
      Resources = Resursai

      And so on. ESTIMATE must read these values and use it. Language settings user can change using ESTIMATE settings page.

       
  • Wanhive

    Wanhive - 2015-09-12

    @Saulenas Language support is one of our priorities. Thanks for bringing the issue into our notice. You have already helped us a lot.

     

Anonymous
Anonymous

Add attachments
Cancel





Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.