dbTalk Databases Forums  

How to insert unicode data into NCHAR column?

comp.databases.ingres comp.databases.ingres


Discuss How to insert unicode data into NCHAR column? in the comp.databases.ingres forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Tomasz Konojacki
 
Posts: n/a

Default How to insert unicode data into NCHAR column? - 04-25-2012 , 09:22 AM






Hi!

Every doc say that NCHAR (NVARCHAR etc.) supports unicode. I have
created database with command "createdb -n", and tried following:

create table aaa (
string nchar(2)
);
insert into aaa values (U&'\0105');
select hex(nchar(string)) from aaa;

Unfortunately it returns 61 00 28 03 which is garbage, it should be 05
01 20 00.

How does one insert insert unicode data to NCHAR column?

Thanks,
Tomasz

Reply With Quote
  #2  
Old   
Ingres Forums
 
Posts: n/a

Default Re: How to insert unicode data into NCHAR column? - 04-25-2012 , 09:43 AM






Hi,
I tried that in an NFC, rather than NFD, installation; it gave the
results you expect.
Try createdb -i instead of createdb -n.
GJ


--
geraintjones

Reply With Quote
  #3  
Old   
Tomasz Konojacki
 
Posts: n/a

Default Re: How to insert unicode data into NCHAR column? - 04-25-2012 , 10:07 AM



Thanks a lot, it works like a charm

W dniu 2012-04-25 16:43, Ingres Forums pisze:
Quote:
Hi,
I tried that in an NFC, rather than NFD, installation; it gave the
results you expect.
Try createdb -i instead of createdb -n.
GJ


Reply With Quote
  #4  
Old   
Ian Kirkham
 
Posts: n/a

Default Re: [Info-Ingres] How to insert unicode data into NCHAR column? - 04-25-2012 , 10:14 AM



Hi Tomasz,
createdb -n creates a database that uses NFD normalisation resulting in
composite characters, such as 0105 being decomposed.
Instead of -n, use -i to retain NFC form which you seem to be expecting.
Regards,
Ian

-----Original Message-----
From: info-ingres-bounces (AT) kettleriver...ting (DOT) com
[mailto:info-ingres-bounces (AT) kettleriverconsulting (DOT) com] On Behalf Of
Tomasz Konojacki
Sent: 25 April 2012 15:23
To: info-ingres (AT) kettleriverconsulting (DOT) com
Subject: [Info-Ingres] How to insert unicode data into NCHAR column?

Hi!

Every doc say that NCHAR (NVARCHAR etc.) supports unicode. I have
created database with command "createdb -n", and tried following:

create table aaa (
string nchar(2)
);
insert into aaa values (U&'\0105');
select hex(nchar(string)) from aaa;

Unfortunately it returns 61 00 28 03 which is garbage, it should be 05
01 20 00.

How does one insert insert unicode data to NCHAR column?

Thanks,
Tomasz
_______________________________________________
Info-Ingres mailing list
Info-Ingres (AT) kettleriverconsulting (DOT) com
http://ext-cando.kettleriverconsulti...fo/info-ingres

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.