cancel
Showing results for 
Search instead for 
Did you mean: 

HOW TO INSERT JAPANESE CHARACTER INTO TABLES

Former Member
0 Kudos

i have an dept table

CREATE TABLE DEPT

(

DEPTNO FIXED(2),

DNAME VARCHAR(15) unicode,

LOC VARCHAR(15)

)

now i want to insert data in japanese like

INSERT INTO DEPT VALUES(10,'漢字','LONDON')

it inserted the data successfully,but instead of storing japanese it simply stores the ??

my database is set to Unicode & mapcharset is also set to unicode

but i am not able to insert japanese characters.

please help me out..

thanx in advance..

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi! Steffen Schildberg,

Thanks for your reply, but me and Bhupinder are trying to understand the way in MAXDB, by which many other languages like Greek, Japanese, Russian etc can be inserted into MAXDB and not Just Japanese.

More over as we need to ship the product to many customers across geographies, there should be a method which could run anywhere.

Can you help us please.

Thanks , Amit & Bhupinder.

Former Member
0 Kudos

I have taken up the data to be inserted (Japanese) in a comma seperated file and saved it in UTF-8 Encoding on my windows xp folder. I have named this file as empdata.dat.

Now I open up my command prompt on windows xp and try to load it through loadercli.

It only saves the data as ?? for Japanese characters. I am looking the data in the table in SQL Studio.

Can you point me where I am wrong.

If there is some other way, can you please tell me the step-by-step procedure for this.

Thank you , Bhupinder.

steffen_schildberg
Active Participant
0 Kudos

Hi Bhupinder,

this is rather a problem of presentation than a problem of loading the values.

The system must have the regional settings set to Japanese fonts and the result window settings of the SQL Studio must be adapted to Japanese, too.

Please check on Windows:

-> Control Panel

-> Regional and Language Options

-> Tab 'Advanced'

-> Select the right language for non-Unicode programs(actually I don't know the right setting for Japanese, sorry)

-> Check if all relevant Code page conversion tables are selected.

Then make sure on SQLStudio:

-> 'Settings'

-> 'Fonts'

-> 'Result Window Font'

-> 'Script' (dropdown box) is set to Japanese

Let me know if this helps.

Regards,

Steffen

alexander_schroeder
Participant
0 Kudos

Hello Bhupinder,

you may want to use a prepared statement (depending on the interface you use).

If your interface is capable of handling Unicode strings (e.g. JDBC with connect option unicode=yes set), you may supply a normal string literal with any Unicode character you like as literal input.

MaxDB does not parse or handle any kind of escape sequences in string literals.

Former Member
0 Kudos

hi

actually i am insert the data from backend not from and java api...so kindly let me know how i can insert japanese characters into the tables...

plze help me out

thanx!!

alexander_schroeder
Participant
0 Kudos

So which interface are you using to send the commands to MaxDB?

Regards

Alexander Schröder

Former Member
0 Kudos

hello Mr. alexander,

i am using loadercli for loading the data,into the tables.but getting error:-invalid sql statement.

but if i will load the data through sql studio by insert statements,then it inserted the data succesffully but in ??? form.

thanx..

steffen_schildberg
Active Participant
0 Kudos

Hello Bhupinder,

is there any chance to have the data in CSV formatted text files for loading? This way you'll get the data loaded, promise.

In case of SQL statements: the Loader simply sends SQL commands to the database without processing it further. So the error you see come from the database itself. If you only have INSERT statements of the form you posted here there is no chance to get it inserted using the Loader (=loadercli). It is not able to handle escaped UNICODE characters.

Regards,

Steffen

Former Member
0 Kudos

Hello Mr Alexander,

well if CSV file help in loading the data that has japanese characters then definitly i will go for CSV file option,because my motive is to load the japanese characters into the tables.but will table stores the japanese or again ti changes that characters into ??? question-marks. kindly clear this doubt.also if possible tell me the coomand to load data from CSV file to database. will i use loadercli utility or someother utility to load data from CSV file.

thanx u very much..