Re: RES: RES: converter ascii para utf8

Osvaldo Kussama <[email protected]>
Newsgroups gmane.comp.db.postgresql.brasil
Message-ID <CADgbbqiPSDoEB6_+yokKFZE+e=HgDtNqHbSQVO7PdKjK7VQo2g__20304.8853356906$1506531194$gmane$org@mail.gmail.com>
Em 27/09/2017, Santiago - NSR<[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
[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.