If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Informix > Collating sequence in multi-lingual data

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 06-09-04, 12:12
lloydnwo lloydnwo is offline
Registered User
 
Join Date: Aug 2003
Location: India
Posts: 262
Collating sequence in multi-lingual data

Dear All,

How is sorting done in multi-lingual data, does it use code-set sorting for all languages. What does the set collation statement do. Please advice.

Best Regards,

Lloyd
Reply With Quote
  #2 (permalink)  
Old 06-09-04, 15:46
Fernanda Fernanda is offline
Registered User
 
Join Date: Jun 2004
Posts: 7
Smile re: collating sequence in multi-lingual data

I use portuguese language and proceed the following way:

1. set the DB_LOCALE, SERVER_LOCALE and CLIENT_LOCALE environment variables to "pt_br.8859-1" (without the quotes);

2. Create the database;

3. Use nchar or nvarchar data types in the columns I want to sort, instead of char and varchar.

This works for portuguese. Look in the $INFORMIXDIR/gls directory what code corresponds to your language. You can check if your database was created in your language using the following SQL command in sysmaster database:

select * from sysdbslocale;

It will give you a list of all your databases in the instance and the respective language.

I hope it will help you.

Fernanda.
Reply With Quote
  #3 (permalink)  
Old 06-09-04, 23:38
lloydnwo lloydnwo is offline
Registered User
 
Join Date: Aug 2003
Location: India
Posts: 262
Hi Fernanda,

Thanks for your feedback. I have set my DB_LOCALE and CLIENT_LOCALE to en_us.utf8 format. I have not set the SERVER_LOCALE though, is it necessary. Also i have used char & varchar datatype. You have used nchar & nvarchar. How does sorting takes place, does is sort by the code-set or language data.

Best Regards,

Lloyd
Reply With Quote
  #4 (permalink)  
Old 12-10-04, 05:16
gksaoji gksaoji is offline
Registered User
 
Join Date: Dec 2004
Posts: 2
Quote:
Originally Posted by lloydnwo
Hi Fernanda,

Thanks for your feedback. I have set my DB_LOCALE and CLIENT_LOCALE to en_us.utf8 format. I have not set the SERVER_LOCALE though, is it necessary. Also i have used char & varchar datatype. You have used nchar & nvarchar. How does sorting takes place, does is sort by the code-set or language data.

Best Regards,

Lloyd
If you do not change your char and varchar datatype to nchar and nvarchar, then sorting will happen based on code set, otherwise sorting will happen based on language data.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On