dbTalk Databases Forums  

[BUGS] ProblemWithCharsOSX

mailing.database.pgsql-bugs mailing.database.pgsql-bugs


Discuss [BUGS] ProblemWithCharsOSX in the mailing.database.pgsql-bugs forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Angel Zúñiga
 
Posts: n/a

Default [BUGS] ProblemWithCharsOSX - 08-15-2012 , 10:19 AM






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 +
Quote:
| | | |
postgres=CTc/postgres
template1 | postgres | UTF8 | es_MX.UTF-8 | es_MX.UTF-8 |
postgres=CTc/postgres+
Quote:
| | | |
=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

Reply With Quote
  #2  
Old   
Tom Lane
 
Posts: n/a

Default Re: [BUGS] ProblemWithCharsOSX - 08-15-2012 , 07:37 PM






=?ISO-8859-1?B?QW5nZWwgWvrxaWdh?= <junior (AT) ciencias (DOT) unam.mx> writes:
Quote:
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)
FWIW, I cannot reproduce that as stated on my own Mac. I suspect though
that the problem is not with Postgres per se but with your terminal
window. If you're using Terminal, check the encoding setting in
Preferences ... Settings, and also look at Preferences ... Encodings.
You'll probably have trouble unless Terminal is using the same encoding
that psql thinks the client_encoding is.

regards, tom lane


--
Sent via pgsql-bugs mailing list (pgsql-bugs (AT) postgresql (DOT) org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.