Other Characterset to UTF8

Поиск
Список
Период
Сортировка
Искать

Other Characterset to UTF8

От:
"Abu Mushayeed" <amushayeed@hotmail.com>
Дата:
We just upgraded our database from LAIN1 to UTF8 and some of the data 
imports were failing due to character set mismatch. So, after reading the 
documentation, here is what we are doing. According to the documentation it 
says that the database does automatic characterset conversion. So based on 
this fact, we are doing the following at the psql prompt:

1. set client_encoding = 'LATIN1';
2. COPY  FROM '

Re: Other Characterset to UTF8

От:
John DeSoi <desoi@pgedit.com>
Дата:

On Jul 20, 2006, at 5:54 PM, Abu Mushayeed wrote:

> 1. set client_encoding = 'LATIN1';
> 2. COPY  FROM '
> The data gets into the database. The datbase has some inbuilt  
> functions that translates the data from LATIN1 to UTF8.
>
> The question is it works but is this correct?


Yes, it is correct assuming the data in the file is really latin1 :).  
You tell PostgreSQL what character set you are using on the client  
side and it takes care of converting it to the encoding used for the  
database.



John DeSoi, Ph.D.
http://pgedit.com/
Power Tools for PostgreSQL

FAQ