Re: [SQL] Internationalisation: SELECT str (ignoring Umlauts/Accents)

From: Patrice Hédé <patrice(at)idf(dot)net>
To: Benedikt Eric Heinen <beh(at)icemark(dot)ch>
Cc: pgsql-sql(at)postgreSQL(dot)org
Subject: Re: [SQL] Internationalisation: SELECT str (ignoring Umlauts/Accents)
Date: 1998-06-22 13:11:16
Message-ID: Pine.LNX.3.96.980622150319.23288A-100000@paris.ivo.fr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)idf(dot)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/ ----------------------------------

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Dionisio Barrantes Blanco 1998-06-23 14:15:44 foreign keys
Previous Message Benedikt Eric Heinen 1998-06-22 11:54:53 Re: [SQL] Internationalisation: SELECT str (ignoring Umlauts/Accents)