Re: Charset Win1250 on Windows and Ubuntu - Mailing list pgsql-general

From Albe Laurenz
Subject Re: Charset Win1250 on Windows and Ubuntu
Date
Msg-id D960CB61B694CF459DCFB4B0128514C2039380EC@exadv11.host.magwien.gv.at
Whole thread Raw
In response to Re: Charset Win1250 on Windows and Ubuntu  (Durumdara <durumdara@gmail.com>)
List 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 by date:

Previous
From: Guillaume Lelarge
Date:
Subject: Re: Unix ODBC on SPARC 64 bits
Next
From: Pau Marc Munoz Torres
Date:
Subject: Drop/ Alter index if exist