Re: pg jdbc driver

Поиск
Список
Период
Сортировка
От Kris Jurka
Тема Re: pg jdbc driver
Дата
Msg-id Pine.BSO.4.56.0408081847470.30812@leary.csoft.net
обсуждение исходный текст
Ответ на pg jdbc driver  (Dino Nardini <dino@rivendellsoftware.com>)
Ответы Re: pg jdbc driver  (Dino Nardini <dino@rivendellsoftware.com>)
Список pgsql-general

On Sat, 7 Aug 2004, Dino Nardini wrote:

> [Could the JDBC driver be causing the problems I'm seeing with my
> website after moving from ColdFusion with ODBC? ]

Unlikely.  A common problem people find when using PostgreSQL's JDBC
driver is that they have setup their database with SQL_ASCII encoding
which doesn't have any information on what high-bit characters actually
represent.  Many applications are OK with this and blindly pass data back
and forth, but Java requires having correctly encoded data and the JDBC
driver will error out with something like "Invalid character data was
found..."  You reported problems correctly displaying this data, not an
error, so I doubt that is the issue.

As I mentioned Java is (sometimes painfully) encoding aware.  I'm not
familar with ColdFusion, but you likely need to set the page encoding
correctly for converting Java Strings into bytes.  This can be
accomplished in a number of ways, for example set globally via the
file.encoding system property or on per page basis via methods in
javax.servlet.ServletResponse such as setCharacterEncoding,
setContentType, and setLocale.

Kris Jurka

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

Предыдущее
От: Dino Nardini
Дата:
Сообщение: pg jdbc driver
Следующее
От: Clodoaldo Pinto Neto
Дата:
Сообщение: How copy a new line char to a file?