Re: [SQL] Internationalisation: SELECT str (ignoring Umlauts/Accents)
| От | Patrice Hédé |
|---|---|
| Тема | Re: [SQL] Internationalisation: SELECT str (ignoring Umlauts/Accents) |
| Дата | |
| Msg-id | Pine.LNX.3.96.980622150319.23288A-100000@paris.ivo.fr обсуждение исходный текст |
| Ответ на | Re: [SQL] Internationalisation: SELECT str (ignoring Umlauts/Accents) (Benedikt Eric Heinen <beh@icemark.ch>) |
| Список | pgsql-sql |
> This brings up another interesting question -- will
> "upper(accentuated-string)" upcase the string properly (including upcasing
> accentuated characters)? e.g. will upper("zürich") become "ZüRICH" or
> "ZÜRICH"?
No, it won't. The locale support is such that only letters in your
default locale (if it's not broken) will be considered upper/lowercase,
and even letters at all. So upper('zürich') is 'ZüRICH'. This is why you
have to use the case insensitive form of the match operation : ~*
It is very easy to make a function which returns the correct
upper/lowercase of stressed letters, however. Maybe I could do one, and
add it to the package :)
I know this is not locale friendly, but locale support design is flawed
anyway (you can't support foreign words in a said locale easily), and I
don't know of a language using 8859-1, for which a lowercase and uppercase
forms of a letter aren't considered as a pair.
Basically, there is only *one* problem, which is the uppercase «ÿ», which
is not much used anyway (in the languages I know, at least !).
Patrice
--
Patrice HÉDÉ --------------------------------- patrice@idf.net -----
Nous sommes au monde. [...] La croyance en un esprit absolu ou en un
monde en soi détaché de nous n'est qu'une rationalisation de cette
foi primordiale. --- Merleau-Ponty, Phénoménologie de la Perception
----- http://www.idf.net/patrice/ ----------------------------------
В списке pgsql-sql по дате отправления: