RES: RES: RES: converter ascii para utf8

"Santiago - NSR" <tatu-GTBGvTVrc0RfyO9Q7EP/[email protected]>
Newsgroups gmane.comp.db.postgresql.brasil
Message-ID <003101d3385a$03a01030$0ae03090$__9291.61869357831$1506603755$gmane$org@com.br>
Maravilha. Vou fazer um teste no decorrer do dia..

 

De: pgbr-geral [mailto:pgbr-geral-bounces-b/[email protected]] Em nome de Gerdan Rezende dos Santos
Enviada em: quarta-feira, 27 de setembro de 2017 14:48
Para: Comunidade PostgreSQL Brasileira
Assunto: Re: [pgbr-geral] RES: RES: converter ascii para utf8

 

Pessoal! Já passei por esse perrengue... E por incrível que pareça a única solução que rodou liso foi:

1 - Faz DUMP

2- Abre no NOTEPAD do windows (não funcionou o notepad++)

3- Salvar o arquivo como e altera o encoding para UTF-8.

4- Restore do banco no formato UTF-8

 

 

Se der certo depois fala pra gente!!! 

 

Sorte ai!




--


Gerdan Rezende dos Santos 
Hortonworks, PostgreSQL & EnterpriseDB Specialist, Support, Training & Services 
+55 (61) 996 451 525

 

2017-09-27 13:53 GMT-03:00 Osvaldo Kussama <[email protected]>:

Em 27/09/2017, Santiago - NSR<tatu-GTBGvTVrc0RfyO9Q7EP/[email protected]> escreveu:
> Bom dia. o banco está em ASCII. Necessito passar para UTF8. Quando uso a
> opção -E UTF8 (do pg_dump) da erro...(ao contrario do que escribi).
> Fiz uma função usando o "translate", estou migrando tabela a tabela e está
> dando certo...
>
> resSTR_       =
> translate($1, 'áàâãäåaaaÁÂÃÄÅAAAÀéèêëeeeeeEEEÉEEÈìíîïìiiiÌÍÎÏÌIIIóôõöoooòÒÓÔÕÖOOOùúûüuuuuÙÚÛÜUUUUçÇñÑýÝ',
>
>                       'aaaaaaaaaAAAAAAAAAeeeeeeeeeEEEEEEEiiiiiiiiIIIIIIIIooooooooOOOOOOOOuuuuuuuuUUUUUUUUcCnNyY'
>                       );
>


Dê uma olhada na unaccent e use-a se julgar mais conveniente:
https://www.postgresql.org/docs/current/static/unaccent.html

Osvaldo

_______________________________________________
pgbr-geral mailing list
pgbr-geral-b/[email protected]
https://listas.postgresql.org.br/cgi-bin/mailman/listinfo/pgbr-geral

_______________________________________________
pgbr-geral mailing list
[email protected]
https://listas.postgresql.org.br/cgi-bin/mailman/listinfo/pgbr-geral
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.