04-18-13, 03:22 #1Registered User
- Join Date
- Jan 2003
Unanswered: How to insert Russian Cyrillic characters in DB2 database
using DB2 v10.1 fixpack 1 on Linux I got requirement to create a database with data in tables in western characters (latin) AND Russian Cyrillic.
I created UTF-8 database, created simple table:
db2 "create database utf8 using codeset UTF-8 territory us" db2 connect to utf8 db2 "create table admin.test (col1 char(20))"
C:\aaa>db2 "insert into admin.test values ('Б')" DB20000I The SQL command completed successfully. C:\aaa>db2 select * from admin.test COL1 -------------------- ?
Any idea why? How to insert Russian Cyrillic characters in DB2 database?
P.S. I choose UTF-8 code page, because I can expect to get any other request from customer selling products all over the world. So it is quite a big chance I will be force to store other (beside latin and cyrillic) characters.
Last edited by grofaty; 04-18-13 at 03:28.
04-18-13, 03:58 #2Registered User
Provided Answers: 11
- Join Date
- Apr 2006
you need a russian client to display these characters
there is a doc about japanese characters - should be similar for you
Setting Up a Mixed-Byte Character Set (MBCS) Database on an English OS in DB2 UDB Version 8Best Regards, Guy Przytula
Database Software Consultant
Good DBAs are not formed in a week or a month. They are created little by little, day by day. Protracted and patient effort is needed to develop good DBAs.
Spoon feeding : To treat (another) in a way that discourages independent thought or action, as by overindulgence.
DB2 UDB LUW Certified V7-V8-V9-V9.7-V10.1-V10.5 DB Admin - Advanced DBA -Dprop..
Information Server Datastage Certified
04-21-13, 17:08 #3Registered User
- Join Date
- Sep 2004
The table data will be OK; the "?" is the default character shown when the client uses a code page which cannot represent the database character (your 'Б').
Your client application (db2 command line command) most likely uses code page 1252 (Windows) by default; make sure this becomes 1208 (UTF-8):
If that doesn't help, try using a graphical SQL client, e.g. Data Studio.
__IBM Certified Database Administrator, DB2 9 for z/OS
__IBM Certified Application Developer
__ABIS Training and Consulting