Re: Adding German Character Set to PostgresSQL

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Hagen Finley <finhagen(at)comcast(dot)net>
Cc: Adrian Klaver <adrian(dot)klaver(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Adding German Character Set to PostgresSQL
Date: 2012-01-02 20:30:59
Message-ID: CAFj8pRDKU_ooQcg9HUPMB_gGmzeD3+cT8TAbaOnMHdZoKins1A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello

2012/1/2 Hagen Finley <finhagen(at)comcast(dot)net>:
> Thanks Adrian,
>
>
>
> Looks like I am currently using UTF8:
>
>
>
> gpdemo=# \encoding
>
> UTF8
>
>
>
> And it looks like UTF8 doesn’t include the German characters I seek. Can
> someone explain how I can switch to 0000-0FFF which looks like the Basic
> Multilingual Plane Unicode which does include the characters I want?
>

I am sure so it has

postgres=# create table xx(a text);
ERROR: relation "xx" already exists
postgres=# create table x(a text);
CREATE TABLE
postgres=# insert into x values('ä,ß,ö');
INSERT 0 1
postgres=# select * from x;
a
-------
ä,ß,ö
(1 row)

postgres=# \encoding
UTF8
postgres=#

Windows console doesn't work well with UTF8 - use pgAdmin there

regards

Pavel Stehule

>
>
> Hagen
>
>
>
>
>
>
>
> -----Original Message-----
> From: Adrian Klaver [mailto:adrian(dot)klaver(at)gmail(dot)com]
> Sent: Monday, January 02, 2012 12:40 PM
> To: Hagen Finley
> Cc: pgsql-general(at)postgresql(dot)org
> Subject: Re: [GENERAL] Adding German Character Set to PostgresSQL
>
>
>
> On 01/02/2012 11:13 AM, Hagen Finley wrote:
>
>> Hi,
>
>>
>
>> I am using psql (8.2.15) and I would like to input German characters
>
>
>
> I am going to assume you are using a Postgresql 8.2.15 server(psql is the
> client program for Postgres, I am being pedantic because it reduces the
> confusion level:) )
>
>
>
>> (e.g. ä,ß,ö) into char fields I have in a database. I am having
>
>> trouble getting the CENTOS Linux OS I am using to input German
>
>> characters via a (apparently supported) German Keyboard Layout.
>
>> However, that might be a separate matter. When I typed the German into
>
>> Notepad in Windows and attempted to cut and paste the words into an
>
>> INSERT statement, the characters do not persist:
>
>
>
> Not sure it would help, but if I had a choice I would use Wordpad.
>
> Notepad tends to fairly brain-dead when handling text.
>
>
>
>
>
>>
>
>> Daß becomes DaDa and Heißt becomes HeiHeit which falls short of what I
>
>> was hoping for.
>
>>
>
>> I am wondering if I need to enable an international character set
>
>> within Postgres before the German characters will input properly? If
>
>> so, it’s not clear from the documentation I have attempted to find how
>
>> one enables other characters sets within Postgres? Any suggestions
>
>> will be much appreciated. Thank you.
>
>
>
> Using psql do a \l at the prompt. That will show what encoding the database
> was setup with.
>
>
>
>>
>
>> Hagen Finley
>
>>
>
>> Boulder, CO
>
>>
>
>
>
> Thanks,
>
> --
>
> Adrian Klaver
>
> adrian(dot)klaver(at)gmail(dot)com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Hannes Erven 2012-01-02 20:52:34 Re: Adding German Character Set to PostgresSQL
Previous Message Hagen Finley 2012-01-02 20:25:26 Re: Adding German Character Set to PostgresSQL