Re: Mis-interpreted extended character

From: Andrew Biagioni <andrew(dot)biagioni(at)e-greek(dot)net>
To: pgsql-admin(at)postgresql(dot)org
Subject: Re: Mis-interpreted extended character
Date: 2003-12-16 01:25:37
Message-ID: 3FDE5F11.6010101@e-greek.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Chris,

Thanks -- your answer is 90% of what I need! As for the other 10%:

Chris wrote:

>>Our database ( (PostgreSQL) 7.3.5 ) uses Unicode encoding:
>>[...]
>>
>>
>
>
>
>>For some reason, If I try to use an extended character (ASCII code >
>>127) in a string, I get this peculiar result:
>>
>>
>
>
>
>>[...]
>>
>>
>
>Probably your terminal is set to ISO-8859-1 ("latin 1") or something
>like that, while your database is set to unicode as you showed.
>
>Hence the mismatch. In unicode (for example UTF-8) non-US-ASCII
>characters are encoded with two bytes (as opposed to one byte > 127
>as happens with ISO-8859-1). Solution is to have everything agree on the
>encoding. Terminal + DB or Web Browser + DB.
>
>Btw. you _do_ actually have an influence on what encoding a web browser
>uses by setting the "encoding" HTTP header.
>
>According to my experience, if you have to deal with only western
>european encodings, you're better off (still) with ISO-8859-1 (or
>ISO-8859-15 to have the EUR symbol too).
>
>
>Short answer: not PostgreSQL's fault.
>
Agreed -- and thanks for the above info.

It ALSO turns out that Java has its own issues with >127 characters,
which I'm going to look into -- but it was nice to prove you right (and
solve half my problem!) by setting the web page encoding...

>Bye, Chris.
>
>
>
>---------------------------(end of broadcast)---------------------------
>TIP 9: the planner will ignore your desire to choose an index scan if your
> joining column's datatypes do not match
>

Thanks again,

Andrew

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message sachdev 2003-12-16 04:03:54 comparing with oracle
Previous Message Kent L. Nasveschuk 2003-12-15 23:35:26 Re: FoxPro Vs. PostgreSQL