Re: Problem with error messages

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: Problem with error messages
Дата
Msg-id 337ce77f-4159-0f43-cdb7-fcac30e3e219@2ndquadrant.com
обсуждение исходный текст
Ответ на Problem with error messages  (Walter Willmertinger <willmis@gmail.com>)
Ответы Re: Problem with error messages  (Alexander Law <exclusion@gmail.com>)
Список pgsql-translators
I finally had a moment to think this through.

The problem is that if an error message is not representable in the
client encoding, all you get as a client are encoding errors.  This can
happen in any translation (or untranslated, except those generally only
have ASCII characters).

In this particular case, the German translated error messages contain
Unicode characters not in LATIN1/LATIN9.  This might have been a bad
choice in retrospect, and can be fixed.  But this same thing might also
happen if you happen to connect to a, say, a database with locale
ru_RU.utf8 while your client encoding is LATIN9.  You will not be able
to get any error message other than an encoding error.  (Ironically, the
backend will first try to send the encoding error in translated form,
which will again fail, and finally it will send it in English.)

I think the recovery path should be changed so that it sends the
original error message in untranslated form, possibly preceded by a
notice that encoding conversion failed.

Comments?


On 6/30/15 9:31 AM, Walter Willmertinger wrote:
> We already wrote in pgsql-bugs (#11550), but there it was recommended to
> transfer this topic to the translator team.
>
> Now the problem:
> If we set client_encoding to Latin9 (as we are here in Germany), we get
> as nearly every error message from PostgreSQL: character with byte
> sequence 0xe2 0x80 0x9e in encoding UTF8 has no
> equivalent in LATIN9
>
> Why:
> In 9.x we have new characters for delimiting words.
>
> An example:
> "Drop table if exists mickeymouse;"
> delivers in PG-8.4
>
> HINWEIS: Tabelle „mickeymouse“ existiert nicht, wird übersprungen
>
> but delivers in PG-9.3
>
> HINWEIS: Tabelle »mickeymouse« existiert nicht, wird übersprungen
>
> If we set client_encoding to Latin9 (as we are here in Germany), we get
> an error message from PostgreSQL:
> character with byte sequence 0xe2 0x80 0x9e in encoding UTF8 has no
> equivalent in LATIN9
>
> but we do not see the real error message: "Table ... does not exist"
>
> So a proposal: Please change these delimiters to something which can be
> compiled to any foreign language, as "  or similar
>
> Regards
> Walter
>
>
> --
>
> Viele Grüße
>
> Walter Willmertinger
>


--
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: open Japanese translation tickets
Следующее
От: Alexander Law
Дата:
Сообщение: Re: Problem with error messages