Обсуждение: lower/upper on latin2 encoding

Поиск
Список
Период
Сортировка

lower/upper on latin2 encoding

От
Laukó Péter
Дата:
Hi list,
can anyone tell me why the characters with accents are not changed by lower and upper? Is it a bug, or should I
configureanything else than the db encoding??? 
thanks in advance, Peter

tpa=# select getdatabaseencoding();
 getdatabaseencoding
---------------------
 LATIN2
(1 row)

tpa=# select upper('árvíztűrő tükörfúrógép aeiou');
            upper
------------------------------
 áRVíZTűRő TüKöRFúRóGéP AEIOU
(1 row)

tpa=# select lower('ÁRVÍZTŰRŐ TÜKÖRFÚRÓGÉP AEIOU');
            lower
------------------------------
 ÁrvÍztŰrŐ tÜkÖrfÚrÓgÉp aeiou
(1 row)




Re: lower/upper on latin2 encoding

От
Alvaro Herrera
Дата:
Laukó Péter dijo:

>
> Hi list,
> can anyone tell me why the characters with accents are not changed by lower and upper? Is it a bug, or should I
configureanything else than the db encoding??? 

Huh, they do in my version ("developer" version).  They should also work
in current stable version, AFAIK.

pg_controldata here gives amongst other things (this should be in
contrib/ in your version):

$ pg_controldata
[... some things ...]
LC_COLLATE:                           es@tradicional
LC_CTYPE:                             es@tradicional

$ psql regression -c "select upper('ñáí')"
 upper
-------
 ÑÁÍ
(1 row)


It should be a matter of setting the locale at initdb time.

--
Alvaro Herrera (<alvherre[a]atentus.com>)
"Hoy es el primer dia del resto de mi vida"