Inserting UTF-8 into Oracle


EJB design: Inserting UTF-8 into Oracle

  1. Inserting UTF-8 into Oracle (3 messages)

    I would like to insert UTF-8 character set data in Oracle 9i but Oracle is not taking data as it should appear in UTF-8. What should be done here?
    Do I need to change the settings in Oracle?
  2. Inserting UTF-8 into Oracle[ Go to top ]

    Couple of things you need to make sure -

    1. Make sure your oracle database is configured for UTF-8 charset.
    2. Make sure you are entering correct data in UTF-8 format.
    3. Take out the data and check if its returning what you entered. This is because I am not sure if command line sql or some client will show the data in utf-8 format correctly.
  3. How sure are u that the data which u r trying to insert into DB is an UTF-8 one?
    Also do check if the data which u r trying to insert into the DB is in a String DataType, make sure that you have not used something like the one mentioned below :

    String dataToBeInserted = new String(dataInByteArray);
    where dataInByteArray is a byte array representing the data which is to be inserted. If it is so then there is a sure case where the data will be transformed into the default character set of the OS on which the application is running. so, when u handle the data in the form of Bytes make sure that u mention the encoding/characterset when u construct a String out of the data.

    If possible do paste the way in which u r trying to insert the data in the Oracle DB.

  4. You might find this URL beneficial:

    Character Conversions from Browser to Database

    Some challenges and resolutions...