Results 1 to 3 of 3
  1. #1
    ahmed30 is offline Member
    Join Date
    Jan 2011
    Rep Power

    Default How To insert non-english Strings to Database

    Hello ,

    I need to insert non-english Strings into a database , i am using mysql database, and the non-english text is "arabic"

    Now i set the collation of my database,tables and fields to


    anyway , i have no problem reading from database in to the application.

    it reads arabic text successfully , the problem is when i try to write to the database. the String displays at the database is "??????" instead of the actual text.

    Any Suggestions ?!!

    Thank You for your time

  2. #2
    doWhile is offline Moderator
    Join Date
    Jul 2010
    Rep Power


    See the following link: MySQL :: MySQL 5.0 Reference Manual :: Using Character Sets and Unicode
    It explains that the JDBC Driver for ConnectorJ uses client encoding for data transfer from client to server, so you should specify the encoding using the characterEncoding property in the url, something like:
    Java Code:

  3. #3
    ahmed30 is offline Member
    Join Date
    Jan 2011
    Rep Power


    Yes , it worked.

    That solved the problem .

    Thank You very much Sir

Similar Threads

  1. insert vector to database
    By jperson in forum JDBC
    Replies: 4
    Last Post: 01-20-2011, 03:42 AM
  2. how to insert data in database
    By Vinay Bhatia in forum JDBC
    Replies: 6
    Last Post: 11-03-2010, 05:06 PM
  3. How to insert random number to database
    By waboke in forum New To Java
    Replies: 1
    Last Post: 09-24-2010, 05:45 PM
  4. why i can't insert data to database
    By khaa_khay in forum Web Frameworks
    Replies: 0
    Last Post: 05-26-2010, 06:37 AM
  5. Replies: 3
    Last Post: 02-28-2009, 10:17 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