Results 1 to 5 of 5
  1. #1
    newbie14 is offline Member
    Join Date
    Feb 2010
    Posts
    63
    Rep Power
    0

    Default Reading utf-8 from mysql not working for certain characters

    We have a mysql table with the collation and fields all set as utf8_unicode_ci. We have a java application using bonecpconfig for connection pooling. We are trying as below to read the characters but is not showing up correctly. Even tried this useUnicode=true&characterEncoding=utf-8. Just to add on we have also tried without using bone cp just normal jdbc connection is the same. It can read normally english characters only when comes to like e.g. russian characters it has problem and shows up something like this оавка гза but in db is this Доставка груза. We have tried to insert and read via php is working fine even run the select statement via phpMyAdmin also works fine just in java the select does not give the required results.

    Java Code:
    BoneCPConfig config = new BoneCPConfig();
    config.setJdbcUrl("jdbc:mysql://localhost:3306/db1?characterEncoding=utf-8");

  2. #2
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,798
    Rep Power
    19

    Default Re: Reading utf-8 from mysql not working for certain characters

    How are you determining that it is reading those characters incorrectly?
    What are you displaying them on?
    Please do not ask for code as refusal often offends.

    ** This space for rent **

  3. #3
    newbie14 is offline Member
    Join Date
    Feb 2010
    Posts
    63
    Rep Power
    0

    Default Re: Reading utf-8 from mysql not working for certain characters

    How I determine is that for e.g. in the db is stored as Доставка груза and when I do a select in java I get this оавка гза. Additionally for normal english words I have no issue it works fine.

  4. #4
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,798
    Rep Power
    19

    Default Re: Reading utf-8 from mysql not working for certain characters

    I'll leave gimbal2 at OTN to ask the questions I was going to ask.

    You should inform forums you have posted at that you have posted the same question elsewhere.
    Saves us duplicating effort.
    Please do not ask for code as refusal often offends.

    ** This space for rent **

  5. #5
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,188
    Rep Power
    19

Similar Threads

  1. Reading characters into a string
    By Teclis in forum New To Java
    Replies: 2
    Last Post: 03-08-2011, 10:08 PM
  2. Two '\n' characters between lines while reading File
    By subith86 in forum New To Java
    Replies: 6
    Last Post: 02-26-2011, 09:56 AM
  3. Reading Characters from a ByteBuffer
    By Dan0100 in forum New To Java
    Replies: 2
    Last Post: 09-20-2010, 10:05 PM
  4. Scanner reading accented characters
    By Phenomena in forum New To Java
    Replies: 2
    Last Post: 04-29-2010, 04:06 PM
  5. Replies: 1
    Last Post: 08-07-2007, 05:32 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •