Bad encoded chars in being inserted into database

Поиск
Список
Период
Сортировка
От Iñigo Martinez Lasala
Тема Bad encoded chars in being inserted into database
Дата
Msg-id 050f01cac99c$7dafe100$790fa300$@com
обсуждение исходный текст
Ответы Re: Bad encoded chars in being inserted into database  (Gabriele Bartolini <gabriele.bartolini@2ndQuadrant.it>)
Re: Bad encoded chars in being inserted into database  (Scott Marlowe <scott.marlowe@gmail.com>)
Список pgsql-admin

Hi everybody.

 

I have a doubt about how postgres deal with bad encoded characters into database.

We have several gforge application. They are using postgres as database.

If we export a database and import again, we have to deal with several bad encoded chars. These bad chars always come from copy & paste emails from Lotus Notes mail client. OK, I understand the Notes client people is using is an ancient application and does not deal very well with some Unicode chars…

What I cannot understand is why postgres accept these bad enconded characters into database, exports them without problema but does not allow them when importing again.

This has been happening since postgers 7.3. However, until 7.4.XX (y don’t remember what minor version) you could import database without ERRORs. However, since 7.4.XX it’s impossible and it’s imperative to clean bad characters (using iconv, for example) prior importing tables.

I agree with this postgres policy, but what I don’t is that you can INSERT them via application. That is, no bad characters should be inserted into database. The check should be made for both import and insert procedures so no bad chars would appear into database.

 

Any suggestion / appreciation about this?

 

We are using php4/5-pgsql module from several distros (CentOS 4/5, debian 4/5 and Ubuntu 8.04LTS) so I discard a pgsql problem and anyway database should deal with this…

 

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

Предыдущее
От: "Yazid Levasseur"
Дата:
Сообщение: pg_resetxlog: command not found
Следующее
От: Devrim GÜNDÜZ
Дата:
Сообщение: Re: pg_resetxlog: command not found