Ok, I discover where the error is. I've downloaded the .po file from
Rosetta (template postgres-8.1, locale "es"), and I saw an issue:

The problem:
----------------------

The postgres-8.1.po file has an UTF-8 encoding, but the header claims
that the encoding is ISO-8859-1:

[EMAIL PROTECTED]:~ $ file postgres-8.1.po
postgres-8.1.po: UTF-8 Unicode PO (gettext message catalogue) text
[EMAIL PROTECTED]:~ $ grep "charset=" postgres-8.1.po
"Content-Type: text/plain; charset=ISO-8859-1\n"

The solution:
---------------------

1. Replace ISO-8859-1 to UTF-8, so we can get the following output:

[EMAIL PROTECTED]:~ $ grep "charset=" postgres-8.1.po
"Content-Type: text/plain; charset=UTF-8\n"

2. Compile the .po file to generate the .mo file:

[EMAIL PROTECTED]:~ $ msgfmt -o postgres-8.1.mo postgres-8.1.po

3. Replace the old /usr/share/locale-
langpack/es/LC_MESSAGES/postgres-8.1.mo file with the just generated
one:

[EMAIL PROTECTED]:~ $ sudo cp -f postgres-8.1.mo /usr/share/locale-
langpack/es/LC_MESSAGES

4. Restart PostgreSQL:
[EMAIL PROTECTED]:~ $ sudo /etc/init.d/postgresql-8.1 restart

Now, I get the messages perfectly corrected:

[EMAIL PROTECTED]:~ $ psql -U examen examen
Contraseña para usuario examen:
Bienvenido a psql 8.1.4, la terminal interactiva de PostgreSQL.

Digite:  \copyright para ver los términos de distribución
       \h para ayuda de comandos SQL
       \? para ayuda de comandos psql
       \g o or termine con punto y coma para ejecutar una consulta
       \q para salir

examen=# select * from test;
ERROR:  no existe la relación «test»
examen=#


** Attachment added: "The corrected postgres-8.1.po file"
   http://librarian.launchpad.net/3030136/postgres-8.1.po.gz

-- 
Broken encoding in server's messages
https://launchpad.net/bugs/39177

--
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to