IC5Notice: We have upgraded developerWorks Community to the latest version of IBM Connections. For more information, read our upgrade FAQ.
Topic
  • 3 replies
  • Latest Post - ‏2012-05-16T14:05:38Z by SystemAdmin
SystemAdmin
SystemAdmin
5837 Posts

Pinned topic Unable to insert hindi font in table fields

‏2012-05-02T06:56:15Z |
Hi,

I Set up a database with Codeset UTF-8, territory US, to insert some hindi data into the table fields.
I am using that field data type as VARGRAPHIC so that it can contain hindi font as well.

Problem:

But when I insert some hindi data from the keyboard (By Google transliteration tool) in devnagri font, but it shows blocks. When I try to do it by insert script (e.g. insert into idms_district(DISTRICTID,DISTRICTNAME,DISTRICTCODE,ACTIVESTATUS,CREATEDBY,UPDATEDBY,STATEID,DISTRICTCATID) values(51,'Singroli सिंगरोली',51,1,1,1,23,1);) then error msg comes that "DB21007E End of file reached while reading the command.
"

Please help.

Regards,
Ankur
Updated on 2012-05-16T14:05:38Z at 2012-05-16T14:05:38Z by SystemAdmin
  • pradagar
    pradagar
    1 Post

    Re: Unable to insert hindi font in table fields

    ‏2012-05-12T10:48:20Z  
    Try creating your database using codeset 1252 an territory IN if you are Windows.

    Refer this link for more information:
    http://publib.boulder.ibm.com/infocenter/db2luw/v9r7/topic/com.ibm.db2.luw.admin.nls.doc/doc/r0004565.html
  • SystemAdmin
    SystemAdmin
    5837 Posts

    Re: Unable to insert hindi font in table fields

    ‏2012-05-16T12:40:30Z  
    • pradagar
    • ‏2012-05-12T10:48:20Z
    Try creating your database using codeset 1252 an territory IN if you are Windows.

    Refer this link for more information:
    http://publib.boulder.ibm.com/infocenter/db2luw/v9r7/topic/com.ibm.db2.luw.admin.nls.doc/doc/r0004565.html
    Hi, Thanks for the reply. I have to use Unicode data and due to that I have to use UTF-8. Please let me know how I can do this.
  • SystemAdmin
    SystemAdmin
    5837 Posts

    Re: Unable to insert hindi font in table fields

    ‏2012-05-16T14:05:38Z  
    Hi, Thanks for the reply. I have to use Unicode data and due to that I have to use UTF-8. Please let me know how I can do this.
    Just for testing purpose can you please try below steps on db2 command prompt and see if it works fine. I tried on my box and its working fine.

    
    db2set DB2CODEPAGE=1208 db2 terminate db2stop force db2start db2 connect to <database name> db2 
    "create table t1(col1 VARCHAR(20))" db2 
    "insert into test1 values('एक')"   db2 
    "select * from t1"   COL1 -------------------- एक   1 record(s) selected.