Aluísio, tentei o procedimento porém:
bash-3.1$ echo $LANG pt_BR.UTF-8 bash-3.1$ initdb -E latin1 data/ could not change directory to "/root" The files belonging to this database system will be owned by user "postgres". This user must also own the server process. The database cluster will be initialized with locale pt_BR.UTF-8. initdb: encoding mismatch The encoding you selected (LATIN1) and the encoding that the selected locale uses (UTF8) do not match. This would lead to misbehavior in various character string processing functions. Rerun initdb and either do not specify an encoding explicitly, or choose a matching combination. bash-3.1$ Em 23 de abril de 2010 11:46, Aluisio Gouveia < [email protected]> escreveu: > Tente isso: > > [r...@lm2-b1 ~]# su postgres > bash-3.2$ export LANG=pt_BR.iso-8859-1 > initdb -E latin1 data/ > createdb -U postgres -T template1 diogo > > -- > Cordialmente; > > Aluisio Gouveia > Rezende Sistemas Ltda. > > > ----- Mensagem original ----- > De: "Diogo Castro" <[email protected]> > Para: "Comunidade PostgreSQL Brasileira" < > [email protected]> > Enviadas: Sexta-feira, 23 de Abril de 2010 11:31:32 > Assunto: Re: [pgbr-geral] Encoding > > > meu SO é Red Hat 5, minha versão do postgresql é 8.3.6 > > e o quando eu executo o comando locale no shell ele me diz que o encoding é > pt_BR.UTF-8 > > SO: rhel5 > locale: > [r...@srv08 opt]# locale > LANG=pt_BR.UTF-8 > LC_CTYPE="pt_BR.UTF-8" > LC_NUMERIC="pt_BR.UTF-8" > LC_TIME="pt_BR.UTF-8" > LC_COLLATE="pt_BR.UTF-8" > LC_MONETARY="pt_BR.UTF-8" > LC_MESSAGES="pt_BR.UTF-8" > LC_PAPER="pt_BR.UTF-8" > LC_NAME="pt_BR.UTF-8" > LC_ADDRESS="pt_BR.UTF-8" > LC_TELEPHONE="pt_BR.UTF-8" > LC_MEASUREMENT="pt_BR.UTF-8" > LC_IDENTIFICATION="pt_BR.UTF-8" > >> LC_ALL= > > > > Em 23 de abril de 2010 11:21, Marcelo Costa > <[email protected]>escreveu: > >> Bom dia >> >> >> On Fri, Apr 23, 2010 at 11:14 AM, Diogo Castro <[email protected]> wrote: >> >>> Bom dia, >>> >>> Alguém sabe a SOLUÇÃO para meu problema de encoding: >>> >>> [r...@srv08 opt]# createdb -U postgres -T template1 -E LATIN1 diogo >>> createdb: database creation failed: ERROR: encoding LATIN1 does not >>> match server's locale en_US.UTF-8 >>> DETAIL: The server's LC_CTYPE setting requires encoding UTF8. >>> >>> SO: rhel5 >>> locale: >>> [r...@srv08 opt]# locale >>> LANG=pt_BR.UTF-8 >>> LC_CTYPE="pt_BR.UTF-8" >>> LC_NUMERIC="pt_BR.UTF-8" >>> LC_TIME="pt_BR.UTF-8" >>> LC_COLLATE="pt_BR.UTF-8" >>> LC_MONETARY="pt_BR.UTF-8" >>> LC_MESSAGES="pt_BR.UTF-8" >>> LC_PAPER="pt_BR.UTF-8" >>> LC_NAME="pt_BR.UTF-8" >>> LC_ADDRESS="pt_BR.UTF-8" >>> LC_TELEPHONE="pt_BR.UTF-8" >>> LC_MEASUREMENT="pt_BR.UTF-8" >>> LC_IDENTIFICATION="pt_BR.UTF-8" >>> LC_ALL= >>> >> >> >> Em linhas gerais você está tentando criar um banco com um encoding LATIN 1 >> onde seu encoding do sistema operacional está setado para UTF-8. >> >> Você precisa que teu encoding do SO esteja de acordo com o encoding do >> banco que quer criar. >> >> Não sei o teu SO e nem a versão do PostgreSQL então não vou sugerir nada >> :-) >> >> -- >> Marcelo Costa >> www.marcelocosta.net >> ------------------------------------------------- >> “You can't always get what you want”, >> >> Doctor House in apology to Mike Jagger >> >> _______________________________________________ >> pgbr-geral mailing list >> [email protected] >> https://listas.postgresql.org.br/cgi-bin/mailman/listinfo/pgbr-geral >> >> > > > -- > Diogo Castro - Dcc > Engenheiro de Computação > MSN: [email protected] > > _______________________________________________ > pgbr-geral mailing list > [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 > > -- Diogo Castro - Dcc Engenheiro de Computação MSN: [email protected]
_______________________________________________ pgbr-geral mailing list [email protected] https://listas.postgresql.org.br/cgi-bin/mailman/listinfo/pgbr-geral
