collation order
Posted in 1999
Topics: Internationalization & Character Sets
I try to set up a german collation order with dynServer 7.3 TNT. In setnet i have set db_locale, client_locale and dblang to "de_de". Though i never have the correct order of data sets after a query. 'ä' still comes at the very end of the data set. Thomas Vatter
Thomas Vatter wrote: > I try to set up a german collation order with dynServer 7.3 TNT. In > setnet i have set db_locale, client_locale and dblang to "de_de". Though > i never have the correct order of data sets after a query. 'ä' still > comes at the very end of the data set. Are you using CHAR or NCHAR fields? Officially, CHAR fields always sort in code set order (as you observe), and NCHAR fields take the locale into account. Check the manuals. -- Jonathan Leffler (jleffler@informix.com, jleffler@earthlink.net) Guardian of DBD::Informix v0.62 -- see http://www.perl.com/CPAN #include <disclaimer.h>
thanx for you answer - yes, i know, nchar is the older nls type for a special collation order. i read the manuals serveral times and -sorry - i think there is missing a chapter with a short survey of the situation. as i understood, gls would have the great advantage that one doesnt have to use special datatypes any more. i therefore used char types and gls-settings. the client shows the data in a new era application. the problem now is, that my gls settings doent influence the collation order. Thomas Vatter Jonathan Leffler wrote: > Thomas Vatter wrote: > > > I try to set up a german collation order with dynServer 7.3 TNT. In > > setnet i have set db_locale, client_locale and dblang to "de_de". Though > > i never have the correct order of data sets after a query. 'ä' still > > comes at the very end of the data set. > > Are you using CHAR or NCHAR fields? > > Officially, CHAR fields always sort in code set order (as you observe), > and NCHAR fields take the locale into account. Check the manuals. > > -- > Jonathan Leffler (jleffler@informix.com, jleffler@earthlink.net) > Guardian of DBD::Informix v0.62 -- see http://www.perl.com/CPAN > #include <disclaimer.h>
On Thu, 30 Dec 1999, Jonathan Leffler wrote: > Are you using CHAR or NCHAR fields? > > Officially, CHAR fields always sort in code set order (as you observe), > and NCHAR fields take the locale into account. Check the manuals. Beware of NCHAR fields! Any search with wildcards will no longer be able to use an index on this field and do a table scan, and your performance will be f**cked! I had to learn the hard way when upgrading from Online 5.10 to IDS 7.30, converting CHAR to NCHAR along the way. I use the de_de.8859-1 locale and my users started to complain about abysmal performance. I verified the table scans with "SET EXPLAIN ON" and opened a call with Siemens support when even optimizer hints wouldn't help. Siemens escalated the case to Informix Germany, and the problem was finally recognized. It seems that when GLS was first introduced, interest in the Non-English locales among customers was so low that this didn't receive much attention. Now that the Eastern European market is expanding considerably, Informix is working on it. I haven't been given much info about when the problem will be fixed, however. Until the problem is solved, I will rather live with incorrect collating order than with inacceptable performance. Regards, Richard -- +----------------------------+-------------------------------------------+ | Dr. Richard Spitz | INTERNET: spitz@ana.med.uni-muenchen.de | | EDV-Gruppe Anaesthesie | Tel : +49-89-7095-6110 | | Klinikum Grosshadern | FAX : +49-89-7095-6420 | | 81366 Munich, Germany | GSM : +49-172-8933578 | +----------------------------+-------------------------------------------+