ProblemWithCharsOSX

From: Angel Zúñiga <junior(at)ciencias(dot)unam(dot)mx>
To: pgsql-bugs(at)postgresql(dot)org
Subject: ProblemWithCharsOSX
Date: 2012-08-15 15:19:14
Message-ID: CAB849dZdwFxtVCmUz9JMyyGh_aaOeUw=Vs=-EsoNiZrMZ0VD+w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hi there,

I'm a PostgreSQL user in the linux world but at the office there is a Mac
computer and I have a problem with postgres in it.

The problem is when I use characters with tildes in spanish like in the
follow word "países".
The next is ilustrates my problem:

test=# SHOW SERVER_ENCODING;
server_encoding
-----------------
UTF8
(1 row)

test=# SELECT pg_client_encoding();
pg_client_encoding
--------------------
UTF8
(1 row)

test=# CREATE TABLE países (nombre VARCHAR(10));
CREATE TABLE
test=# \d
List of relations
Schema | Name | Type | Owner
--------+-------+-------+--------
public | pases | table | dragon
(1 row)

The table name is created without the "í" character but if I enclose the
string between quotes postgres works fine.
test=# CREATE TABLE "países" (nombre VARCHAR(10));
CREATE TABLE
test=# \d
List of relations
Schema | Name | Type | Owner
--------+--------+-------+--------
public | países | table | dragon
public | pases | table | dragon
(2 rows)
test=# \l
List of databases
Name | Owner | Encoding | Collation | Ctype |
Access privileges
-----------------+----------+----------+-------------+-------------+-----------------------
template0 | postgres | UTF8 | es_MX.UTF-8 | es_MX.UTF-8 |
=c/postgres +
| | | | |
postgres=CTc/postgres
template1 | postgres | UTF8 | es_MX.UTF-8 | es_MX.UTF-8 |
postgres=CTc/postgres+
| | | | |
=c/postgres
test | dragon | UTF8 | es_MX.UTF-8 | es_MX.UTF-8 |

In the linux box all works fine, so I think the problem is something
particular to Mac,
The Mac OS X version is 10.7.4.
Darwin Users-iMac.local 11.4.0 Darwin Kernel Version 11.4.0: Mon Apr 9
19:32:15 PDT 2012; root:xnu-1699.26.8~1/RELEASE_X86_64 x86_64

and the postgres version is 9.0.8.

Can Anybody help me with my problem?

Thanks in advance,
Angel

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Bruce Momjian 2012-08-15 15:24:49 Re: BUG #6162: initdb : Windows username isn't escaped
Previous Message Kevin Grittner 2012-08-15 15:08:21 Re: BUG #7495: chosen wrong index