Re: RE : ? (question mark) characters

From: Barry Lind <barry(at)xythos(dot)com>
To: Kovács Péter <peter(dot)kovacs(at)sysdata(dot)siemens(dot)hu>
Cc: Rene Pijlman <rene(at)lab(dot)applinet(dot)nl>, pgsql-jdbc(at)postgresql(dot)org, quentin(dot)delance(at)insalien(dot)org
Subject: Re: RE : ? (question mark) characters
Date: 2001-09-03 16:49:27
Message-ID: 3B93B497.8070108@xythos.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Kovács Péter wrote:
>>the driver what character set the backend is sending us? Can't
>>it ask the backend dynamically?
>>
>>
>
> This is what it actually does, isn't it? (Based on what I usually see in the
> trace output on the backend.) I tested a unicode database with varchar(255)
> fields and hungarian accented characters and it worked just fine. (With
> PostgreSQL 7.2.1 I think.)
>

Yes this is exactly what the driver does. It asks the server what
character set is being used for the database. Unfortunatly the server
only knows about character sets if multibyte support is compiled in. If
the server is compiled without multibyte, then it always reports to the
client that the character set is SQL_ASCII (where SQL_ASCII is 7bit
ascii). Thus if you don't have multibyte enabled on the server you
can't support 8bit characters through the jdbc driver, unless you
specifically tell the connection what character set to use (i.e.
override the default obtained from the server).

thanks,
--Barry

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Rene Pijlman 2001-09-03 17:31:27 Re: RE : ? (question mark) characters
Previous Message Kovács Péter 2001-09-03 06:53:17 Re: RE : ? (question mark) characters