Hi, Here is the output a psql session. Please notice that the identation inconsistences in the records containg non ASCII chars is as outputed by psql.
The db was created with LANIN9 and the console was ran (in the same machine) using UTF-8 (my system's default). I was surprised to notice that setting the client to unicode (which is what that console is using) messed the localized chars as I was expecting to see the opposite way. On the other way, when invoking from a Java app, running on the same machine, the accentuaded chars also appeared messed. Have I misunderstood the manual? How can I get a consistant behaviour? It was tested in a Debian/unstable box, running PostgreSQL 7.4.5-3 and Sun's JVM 1.4.2 Thanks, Carlos psql session: ----- mpb2-m16e=# \l List of databases Name | Owner | Encoding -----------+----------+---------- mpb2-test | carlos | LATIN9 template0 | postgres | LATIN9 template1 | postgres | LATIN9 (3 rows) mpb2-m16e=# select tipo_doc_id, nome, descricao from tab_tipo_doc where tipo_doc_id < 100; tipo_doc_id | nome | descricao -------------+----------------------+--------------------------------------- 0 | | (documento desconhecido) 1 | Encomenda | Encomendas 2 | Factura | Facturas 3 | Tx. Dinheiro | TransacÃÃes a Dinheiro 11 | Nota de CrÃdito | Notas de CrÃdito 12 | Nota de DÃbito | Notas de DÃbito 21 | G. Remessa | Guia de Remessa 91 | SaÃda ArmazÃm | SaÃdas de ArmazÃm 92 | Ent. ArmazÃm | Entradas em ArmazÃm 5 | DevoluÃÃo | DevoluÃÃes de Facturas/Tx. Dinheiro 99 | Acerto Inv. | Acerto de InventÃrio 51 | O.T. | Ordens de Trabalho (12 rows) mpb2-m16e=# set client_encoding to unicode; SET mpb2-m16e=# select tipo_doc_id, nome, descricao from tab_tipo_doc where tipo_doc_id < 100; tipo_doc_id | nome | descricao -------------+----------------------+--------------------------------------- 0 | | (documento desconhecido) 1 | Encomenda | Encomendas 2 | Factura | Facturas 3 | Tx. Dinheiro | TransacÃÂÃÂes a Dinheiro 11 | Nota de CrÃÂdito | Notas de CrÃÂdito 12 | Nota de DÃÂbito | Notas de DÃÂbito 21 | G. Remessa | Guia de Remessa 91 | SaÃÂda ArmazÃÂm | SaÃÂdas de ArmazÃÂm 92 | Ent. ArmazÃÂm | Entradas em ArmazÃÂm 5 | DevoluÃÂÃÂo | DevoluÃÂÃÂes de Facturas/Tx. Dinheiro 99 | Acerto Inv. | Acerto de InventÃÂrio 51 | O.T. | Ordens de Trabalho (12 rows) ---------------------------(end of broadcast)--------------------------- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faqs/FAQ.html