Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
Database Servers
DB2InformixIngresMS SQLOraclePervasive.SQLPostgreSQLProgressSybase
Desktop Databases
FileMakerFoxProMS AccessParadox
General
General DB TopicsDatabase Theory
Related Topics
Java Development.NET DevelopmentVB DevelopmentMore Topics ...

Database Forum / Informix Topics / January 2005

Tip: Looking for answers? Try searching our database.

How do i guarantee sorting using UCS-2 character set?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Irfan Bondre - 26 Jan 2005 08:07 GMT
Hi:
How do I sort always in UCS-2 character set. Even if my CHAR and NCHAR
column character set is different.

Thanks,
Irfan
Art S. Kagel - 26 Jan 2005 15:02 GMT
> Hi:
> How do I sort always in UCS-2 character set. Even if my CHAR and NCHAR
> column character set is different.

It's only possible with IDS 9.40+ using the SET COLLATION statement in the
session that requires the alternate ordering.  SET NO COLLATION reverts the
session to default ordering.

Art S. Kagel
Irfan Bondre - 26 Jan 2005 18:17 GMT
Hi:

But Set Collation only effects NCHAR and NVARCHAR data...
From Informix GLS user guide
"The SET COLLATION statement can specify the localized collating order of

a locale that is different from what DB_LOCALE specifies. This localized

collation is applied to sorting operations on NCHAR and NVARCHAR data

types in the same session. Database objects that sort NCHAR or NVARCHAR

values use the collating order that was in effect when the object was
created,

if this differs from the DB_LOCALE setting."

What about CHAR and VARCHAR columns ?

Irfan.

> > Hi:
> > How do I sort always in UCS-2 character set. Even if my CHAR and NCHAR
[quoted text clipped - 5 lines]
>
> Art S. Kagel
Jonathan Leffler - 27 Jan 2005 04:17 GMT
> But Set Collation only effects NCHAR and NVARCHAR data...
> From Informix GLS user guide
[quoted text clipped - 7 lines]
>
> What about CHAR and VARCHAR columns ?

Cast to NCHAR or NVARCHAR before comparing?

I didn't say it was nice - just that it should work.

>>>How do I sort always in UCS-2 character set. Even if my CHAR and NCHAR
>>>column character set is different.
>>
>> It's only possible with IDS 9.40+ using the SET COLLATION
>> statement in the session that requires the alternate ordering.
>> SET NO COLLATION reverts the session to default ordering.

Signature

Jonathan Leffler                   #include <disclaimer.h>
Email: jleffler@earthlink.net, jleffler@us.ibm.com
Guardian of DBD::Informix v2003.04 -- http://dbi.perl.org/

Alexey Sonkin - 26 Jan 2005 20:10 GMT
Informix is unable to keep/process UCS-2 natively. At all.

The problem with UCS-2 / UTF-16 is that for English symbols,
every second symbol is ASCII '0' - end of line symbol

The only way to keep UCS-2 data in Informix is to use the UNICODE
datablade.

In contrast with UCS-2, UTF-8 works perfectly with Informix.

-Alexey

> -----Original Message-----
> From: owner-informix-list@iiug.org
[mailto:owner-informix-list@iiug.org] On
> Behalf Of Art S. Kagel
> Sent: Wednesday, January 26, 2005 10:02 AM
[quoted text clipped - 4 lines]
> > Hi:
> > How do I sort always in UCS-2 character set. Even if my CHAR and
NCHAR
> > column character set is different.
>
> It's only possible with IDS 9.40+ using the SET COLLATION statement in
the
> session that requires the alternate ordering.  SET NO COLLATION
reverts the
> session to default ordering.
>
> Art S. Kagel

sending to informix-list
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.