Re: Charset Win1250 on Windows and Ubuntu

Поиск
Список
Период
Сортировка
От Albe Laurenz
Тема Re: Charset Win1250 on Windows and Ubuntu
Дата
Msg-id D960CB61B694CF459DCFB4B0128514C2039380EC@exadv11.host.magwien.gv.at
обсуждение исходный текст
Ответ на Re: Charset Win1250 on Windows and Ubuntu  (Durumdara <durumdara@gmail.com>)
Список pgsql-general
Durumdara wrote:
[client_encoding is switched to WIN1250]
> And what happening what DB recognize not win1250 character in SQL?
> Is it converted to "?" or an exception dropped?
> And if the UTF db contains non win1250 character?
> Is it replaced in result with "?" or some exception dropped?

What you wrote is very confusing/confused; this is problably a
language problem.

I'll try to reformulate your questions and answer them; if I
got something wrong, please tell me.

Q: What happens if your SQL statement contains a character that is not WIN1250 encoded?
   Is it converted to "?" or do you get an error?

A: You get an error (this is not Oracle). Here an example for hex 88:
   ERROR:  character 0x88 of encoding "WIN1250" has no equivalent in "UTF8"
   Since every known character is representable in UTF-8, that means
   that this is an invalid byte.

Q: What happens if you select a character in the UTF8 database that cannot be
   converted to WIN1250?

A: You will also get an error. Here is what you get for selecting a "G clef":
   ERROR:  character 0xf09d849e of encoding "UTF8" has no equivalent in "WIN1250"

Yours,
Laurenz Albe

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

Предыдущее
От: Guillaume Lelarge
Дата:
Сообщение: Re: Unix ODBC on SPARC 64 bits
Следующее
От: Pau Marc Munoz Torres
Дата:
Сообщение: Drop/ Alter index if exist