lower/upper on latin2 encoding

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

lower/upper on latin2 encoding

От:
Laukó Péter <plauko@freemail.hu>
Дата:

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 configure anything 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 <alvherre@atentus.com>
Дата:
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 configure anything 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 ()
"Hoy es el primer dia del resto de mi vida"

FAQ