App Connect

App Connect

Join this online user group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
  • 1.  Inserting Tamil characters in PostgreSQL DB

    Posted 28 days ago

    Hi Team,

    As a part of development I'm trying to insert Tamil characters into the database, The input Tamil characters are passing in JSON with 546 encoding and 1208 CCSID anyhow I tried with same CCSID and encoding properties it is not inserting into the DB properly, the inserted value in DB is  in "" format additionally I tried with various CCSID and encoding combinations but no luck I'm attaching the ESQL which I tried from APP Connect.

    ESQL Code:

    PASSTHRU('INSERT INTO mytable1 VALUES (?,?,?)',CAST(InputRoot.JSON.Data.name AS CHARACTER CCSID 1208 ENCODING 546),'','');

    looking forward for the solution.



    ------------------------------
    Manideep vusakoila
    ------------------------------


  • 2.  RE: Inserting Tamil characters in PostgreSQL DB

    Posted 27 days ago
    Edited by Francois Brandelik 27 days ago

    What is the CCSID of your Database ?

    Can you make it be 1208? (Assuming your DB is Postgres)

    To change the encoding of your database:
    
        Dump your database
        Drop your database,
        Create new database with the different encoding
        Reload your data.
    
    Make sure the client encoding is set correctly during all this.
    
    

    Source: http://archives.postgresql.org/pgsql-novice/2006-03/msg00210.php

    Please review the corresponding procedure for your flavor of DB (Oracle, MSSQL, Maria, etc...)

    Hope this helps



    ------------------------------
    Francois Brandelik
    ------------------------------



  • 3.  RE: Inserting Tamil characters in PostgreSQL DB

    Posted 25 days ago

    Hi Manideep! It's possible that the value in DB is correct, but the DB just cannot show/display it properly.

    Are you able to retrieve the value from the DB in code and print it to the screen? You may be able to see that the correct Tamil characters are there.

    As Francois Brandelik said, you can check the CCSID of your Database and possibly make sure that it is displaying characters as CCSID 1208 instead of something else. If it's trying to show them as ASCII instead of UTF-8, for example, that may be why you only see the empty square characters (""). Please tell us the brand/version of your database and what tool you are using to view the values, so we can assist in perhaps fixing the settings to display correctly.



    ------------------------------
    Michael Holtan
    ------------------------------