On 2013-10-28 15:08, John McKown wrote:
I wasn't wanting to translate words. But when we do a comparison on the z,
we basically just do a byte-for-byte compare. That does not always give the
proper result. I am not very familar with "culturally correct" collations.
But I do remember (from 10e7 years ago) that in Spanish, the "ch" is
considered a single character which collates after "c" and before "d". So,
from one stand point, to do a "correct" compare would somehow need to say
that the string: "chorizo" is greater than "ciudad". But in both CP-1047
and ISO8859-1, this is not true.
But I now see from what Mr. Gilmore has been saying that I am perhaps
wanting too much from a computer language. I will need to depend on the
programmer actually doing the proper things in all of his/her programs. So
that when I use chorizo in English it will show up before cider, but if
I-the-programmer know that Spanish is the "locale", that it is after
ciudad. I don't know how this can be done generically. Especially if one
throws words in Latin characters into a list with words in Greek characters.
"Intelligent" string collation of the sort you are suggesting is
probably something that would find a better home in a run time library
or in a utility product, as opposed to being built right into a computer
language. In fact, a Google search for "locale sensitive string
comparison" shows that such facilities are available for several languages.
--
Regards, Gord Tomlin
Action Software International
(a division of Mazda Computer Corporation)
Tel: (905) 470-7113, Fax: (905) 470-6507
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN