Re: BUG #15805: Problem with lower function for greek sigma(Σ) letter

Поиск
Список
Период
Сортировка
От Daniel Verite
Тема Re: BUG #15805: Problem with lower function for greek sigma(Σ) letter
Дата
Msg-id 5d80ac2d-3f1f-4d60-88a8-5602eb9978a3@manitou-mail.org
обсуждение исходный текст
Ответ на BUG #15805: Problem with lower function for greek sigma (Σ) letter  (PG Bug reporting form <noreply@postgresql.org>)
Ответы Re: BUG #15805: Problem with lower function for greek sigma (Σ) letter  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
    PG Bug reporting form wrote:

> lower('ΔΗΜΟΤΕΣ ΦΑΙΣΤΟΥ') =
> "δημοτεσ φαιστου" instead of "δημοτες φαιστου"

With PostgreSQL version 10 or newer, you could use an ICU
locale. lower() would produce the expected result:

psql (11.3 (Debian 11.3-1.pgdg90+1))

=> select lower('ΔΗΜΟΤΕΣ ΦΑΙΣΤΟΥ' collate "und-x-icu");
      lower
-----------------
 δημοτες φαιστου
(1 row)

This case looks comparable to the case of the german ß (sharp s),
which should be upcased into 'SS', but the locales backed by libc
don't do that:

=> select upper(''Ich muß');
  upper
---------
 ICH MUß

For that exemple as well, an ICU locale produces a correct
result with regard to linguistic rules:

=> select upper('Ich muß' collate "und-x-icu");
  upper
----------
 ICH MUSS

The libc library provides an API with character-by-character
case conversions (tolower/toupper), which is too limited
to deal with the above cases, and PostgreSQL basically
just uses this API.


Best regards,
--
Daniel Vérité
PostgreSQL-powered mailer: http://www.manitou-mail.org
Twitter: @DanielVerite



В списке pgsql-bugs по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: BUG #15804: Assertion failure when using logging_collector with EXEC_BACKEND
Следующее
От: Tom Lane
Дата:
Сообщение: Re: BUG #15805: Problem with lower function for greek sigma (Σ) letter