Re: 7.3.1 UTF-8 bug(?) and 7.2.x Charset compatibility

Поиск
Список
Период
Сортировка
Искать
От
Barry Lind
Тема
Re: 7.3.1 UTF-8 bug(?) and 7.2.x Charset compatibility
Дата
Msg-id
3E413FC8.90003@xythos.com
Ответ на
Список
Дерево обсуждения
7.3.1 UTF-8 bug(?) and 7.2.x Charset compatibility Achilleus Mantzios <achill@matrix.gatewaynet.com>
Re: 7.3.1 UTF-8 bug(?) and 7.2.x Charset compatibility Barry Lind <blind@xythos.com>
Re: 7.3.1 UTF-8 bug(?) and 7.2.x Charset compatibility Achilleus Mantzios <achill@matrix.gatewaynet.com>
Re: 7.3.1 UTF-8 bug(?) and 7.2.x Charset compatibility Barry Lind <blind@xythos.com>
Re: 7.3.1 UTF-8 bug(?) and 7.2.x Charset compatibility Achilleus Mantzios <achill@matrix.gatewaynet.com>
Re: 7.3.1 UTF-8 bug(?) and 7.2.x Charset compatibility Dave Cramer <Dave@micro-automation.net>
emacs behave like pgjindent? Michael Adler <adler@glimpser.org>
Re: emacs behave like pgjindent? Dave Cramer <Dave@micro-automation.net>
Re: emacs behave like pgjindent? Michael Adler <adler@glimpser.org>
new class layout to support COPY protocal Michael Adler <adler@glimpser.org>
patch for COPY Michael Adler <adler@glimpser.org>
Re: patch for COPY Kris Jurka <books@ejurka.com>
Re: patch for COPY Michael Adler <adler@glimpser.org>
Re: patch for COPY Kris Jurka <books@ejurka.com>
Re: patch for COPY Michael Adler <adler@glimpser.org>
Re: patch for COPY Tom Lane <tgl@sss.pgh.pa.us>
revised patch for COPY Michael Adler <adler@glimpser.org>
Re: 7.3.1 UTF-8 bug(?) and 7.2.x Charset compatibility Achilleus Mantzios <achill@matrix.gatewaynet.com>
Re: 7.3.1 UTF-8 bug(?) and 7.2.x Charset compatibility Achilleus Mantzios <achill@matrix.gatewaynet.com>


Achilleus Mantzios wrote:
> b) NOT GREEK RELATED!
>  With database_encoding set to SQL_ASCII, the server converts these wierd
>  2 chars (0xA0 0x0A) to UTF-8, and then the driver simply fails.
> 
> I think you should deal with problem b).
> To create a test case is easy.
> Create a SQL_ASCII database, then insert these 2 chars in a text column
> (having typed these two chars with some utility like khexedit),
> and then out.println this string.
> 

Achilleus,

I want to understand what you mean by 'deal with the problem'.  Since 
0xA0 and 0x0A are invalid SQL_ASCII characters, the only thing I can 
think of is to produce a better exception in this case.  So instead of 
the current ArrayIndexOutOfBounds exception, this case would throw a SQL 
Exception with a message something like:  "Invalid characters were 
found.  This is most likely caused by stored data containing characters 
that are invalid for the character set the database was created in.  The 
most common example of this is storing 8bit data in a SQL_ASCII database."

thanks,
--Barry



В списке pgsql-jdbc по дате отправления
От: Felipe Schnack
Дата:
От: Barry Lind
Дата:
Сообщение: Re: java.lang.OutOfMemoryError
FAQ