Re: Changing character set when the damage is done

Поиск
Список
Период
Сортировка
От Michael Fuhr
Тема Re: Changing character set when the damage is done
Дата
Msg-id 20061224191251.GA46309@winnie.fuhr.org
обсуждение исходный текст
Ответ на Re: Changing character set when the damage is done  (Alexis Paul Bertolini <bertolini@computer.org>)
Список pgsql-sql
On Sun, Dec 24, 2006 at 06:44:04PM +0100, Alexis Paul Bertolini wrote:
> >SELECT convert(colname, 'utf8', 'latin1') FROM tablename;
>
> Yep, I meant the A with the tilde (the word cedilla sounded Spanish... 
> lol). Thanks, the "convert" function does the trick for me.

If possible consider recreating the database with an encoding other
than SQL_ASCII (e.g., LATIN1 or UTF8).  If you do that, and if you
set client_encoding appropriately when inserting and selecting data,
then the database will convert the data automatically.

> Using win1252 I get a "invalid destination encoding" error, but no 
> problem since I know for sure there aren't any euro signs.

Versions 8.1 and later support win1252 so I'd guess you're using
8.0 or earlier.  Consider upgrading to 8.1 or 8.2 for numerous
improvements over earlier releases.

http://www.postgresql.org/docs/8.1/interactive/release-8-1.html
http://www.postgresql.org/docs/8.2/interactive/release-8-2.html

-- 
Michael Fuhr


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

Предыдущее
От: Alexis Paul Bertolini
Дата:
Сообщение: Re: Changing character set when the damage is done
Следующее
От: "Jan Meyland Andersen"
Дата:
Сообщение: Related tables to a view