Re: convert database to unicode

Поиск
Список
Период
Сортировка
От Gianni Mariani
Тема Re: convert database to unicode
Дата
Msg-id 3F4AF35C.5020201@mariani.ws
обсуждение исходный текст
Ответ на convert database to unicode  (David Lutz <dlutzy@yahoo.com.au>)
Ответы Re: convert database to unicode  (David Lutz <dlutzy@yahoo.com.au>)
Список pgsql-general
David Lutz wrote:

>Hello,  I want to convert an existing database with
>SQL_ASCII encoding to UNICODE encoding.
>
>(postgresql ver 7.3.2)
>
>I thought that it might be as easy as:
>pg_dump mydatabase > dump.sql
>createdb --encoding=unicode newdatabase
>psql newdatabase < dump.sql
>
>but it wasn't going to be that easy now was it :-(
>
>I'm getting errors such as:
>ERROR:  copy: line 54, Invalid UNICODE character
>sequence found (0xe46765)
>lost synchronization with server, resetting connection
>
>Can anyone suggest a way I might be able to do it?
>Thanks,   David
>

You *might* be able to convert dump.sql to unicode.

i.e.

iconv -f iso8859-1 -t utf-8 <  dump.sql > dump-utf-8.sql

If all the bytea chars are appropriately escaped, this may do it.

Can't harm in giving it a go !







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

Предыдущее
От: "Gregory S. Williamson"
Дата:
Сообщение: is linux ready for databases ? (Ziff Davis article on Oracle and Linux)
Следующее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: Database recovery after fs crash