IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online 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.  Insert Chinese Characters in Oracle.

    Posted Wed July 22, 2009 06:24 AM

    Hi I am trying to insert chinese characters in database. When i select those fields with chinese characters, it shows me ‘???’. Any idea how to get chinese characters inserted ?

    Database is already UTF-8 encoding and can accept chinese characters from other applications.

    When I trace the flow in wM developer i can see whose characters as boxes which mean they are OK.

    Do I have to set encoding anywhr or is taken care by database driver ?

    any hints ?


    #Flow-and-Java-services
    #Integration-Server-and-ESB
    #webMethods


  • 2.  RE: Insert Chinese Characters in Oracle.

    Posted Wed July 22, 2009 10:09 PM

    Are you using JDBCAdapter to access the DB?
    What’s the JDBC Type and output Type you used for those fields when selecting?
    Varchar & String type should work if the DB column type is properly defined.
    If not, try to select as binary and convert using BinaryToString with UTF-8.

    Double check with the installation guide (search unicode) to make sure the DB side is correct.


    #webMethods
    #Flow-and-Java-services
    #Integration-Server-and-ESB


  • 3.  RE: Insert Chinese Characters in Oracle.

    Posted Thu July 23, 2009 03:18 AM

    Hi tongwang,

    Thanx for the quite note.

    The problem is not with selecting chinese characters. Its when inserting chinese characters. The database encoding is already unicode as it has many records having chinese characters.

    Also i found something weird that my operation with chinese characters works whn I use dynamic JDBC Adapter SQL template, but doesn’t when using insert adapter template.


    #Integration-Server-and-ESB
    #webMethods
    #Flow-and-Java-services


  • 4.  RE: Insert Chinese Characters in Oracle.

    Posted Thu July 23, 2009 07:34 PM

    I guess you need to make sure what you are inserting is UTF-8.
    Other encoding is commonly used for encoding Chinese characters (GB2312 or big5 etc.), so you need to verify what you are getting, if needed create some java code to convert. If you directly insert GB2312 encoded chinese into a UTF-8 table, i bet it won’t work.
    Hope this helps.


    #Integration-Server-and-ESB
    #Flow-and-Java-services
    #webMethods


  • 5.  RE: Insert Chinese Characters in Oracle.

    Posted Fri July 24, 2009 04:38 AM

    Even dynamic SQL is not working with Oracle database.

    I am able to insert the same record in SQL server 2005, but does not when insert in Oracle. I wonder if its an issue with oracle JDBC driver !.

    How do i know what i am getting ? Is there way to get encoding type based on the incoming data.

    Jiten


    #Integration-Server-and-ESB
    #webMethods
    #Flow-and-Java-services


  • 6.  RE: Insert Chinese Characters in Oracle.

    Posted Fri July 24, 2009 08:06 PM

    If you can use java, try : java.io.InputStreamReader
    it has getEncoding() method. but i’m not sure if it aways giving you the right value.

    If you are dealing xml, xml tag should have encoding, use that.

    If SQL server works, that may indicat your encoding setting in Oracle is not right


    #Integration-Server-and-ESB
    #webMethods
    #Flow-and-Java-services