Re: [GENERAL] Adding German Character Set to PostgresSQL

2012-01-20 Thread Chris Travers
I wonder if the issue is in client encoding.  How do these characters
in various Windows codepages relate to UTF characters?

Best Wishes,
Chris Travers

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


Re: [GENERAL] Adding German Character Set to PostgresSQL

2012-01-20 Thread Jasen Betts
On 2012-01-03, Frank Lanitz  wrote:
> Am 02.01.2012 20:13, schrieb Hagen Finley:
>> I am using psql (8.2.15) and I would like to input German characters
>> (e.g. ä,ß,ö) into char fields I have in a database
>
> I see that you are using Outlook which leads me to assume you are
> running Windows as host for your transaction. Therefor you might are
> logged in into server with putty. Can you ensure you putty settings are
> correct so ä etc are get posted properly to database? Also what is
> bringing you to the points its not working correctly?

last time I played with putty I discovered a setting that enabled UTF8
I didn't test it beyond verifying that slrn looked a lot nicer with
UTF8 enabled, specifically I didn't test input, but I note that there
is some UTF8 support but by default it is disabled.


-- 
⚂⚃ 100% natural


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


Re: [GENERAL] Adding German Character Set to PostgresSQL

2012-01-03 Thread Hagen Finley
Thank you all for your thoughtful suggestions. I just left for a 5 day East 
Coast business trip so I won't have a chance to tackle this gain until the 
weekend. For the record, I am running Centos as a VM on both a MAC OS 10.7 
laptop and a Windows 7 Workstation. In theory, I ought to be able use these 
differing platforms to test these suggestions more rigorously. Thanks again!

Hagen Finley
hagen.fin...@emc.com
Technical Business Consultant
EMC
303-886-1232
Sent from my iPad 2

On Jan 3, 2012, at 3:34, John R Pierce  wrote:

> On 01/02/12 6:21 PM, Hagen Finley wrote:
>> Yes but I couldn't input your second line - the  ('ä,ß,ö') was not possible 
>> via the psql client - just got beeped when I tried to type or paste those 
>> characters.
> 
> the problem is, MS Windows and only MS Windows uses UTF16 instead of the UTF8 
> that the entire rest of the world uses, so what looks right in Notepad or 
> other windows software, is in fact encoded wrong for any non-MS UTF8 system.  
> your SSH utility is supposed to be taking care of the differences, and it 
> generally works with VanDyke's SecureCRT but I've had issues with PuTTY.
> 
> -- 
> john r pierceN 37, W 122
> santa cruz ca mid-left coast
> 
> 
> 
> -- 
> Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general

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


Re: [GENERAL] Adding German Character Set to PostgresSQL

2012-01-03 Thread John R Pierce

On 01/02/12 6:21 PM, Hagen Finley wrote:

Yes but I couldn't input your second line - the  ('ä,ß,ö') was not possible via 
the psql client - just got beeped when I tried to type or paste those 
characters.


the problem is, MS Windows and only MS Windows uses UTF16 instead of the 
UTF8 that the entire rest of the world uses, so what looks right in 
Notepad or other windows software, is in fact encoded wrong for any 
non-MS UTF8 system.  your SSH utility is supposed to be taking care of 
the differences, and it generally works with VanDyke's SecureCRT but 
I've had issues with PuTTY.


--
john r pierceN 37, W 122
santa cruz ca mid-left coast



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


Re: [GENERAL] Adding German Character Set to PostgresSQL

2012-01-03 Thread Frank Lanitz
Am 02.01.2012 20:13, schrieb Hagen Finley:
> I am using psql (8.2.15) and I would like to input German characters
> (e.g. ä,ß,ö) into char fields I have in a database

I see that you are using Outlook which leads me to assume you are
running Windows as host for your transaction. Therefor you might are
logged in into server with putty. Can you ensure you putty settings are
correct so ä etc are get posted properly to database? Also what is
bringing you to the points its not working correctly?

Cheers,
Frank

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


Re: [GENERAL] Adding German Character Set to PostgresSQL

2012-01-03 Thread Florian Weimer
* Hagen Finley:

> Yes but I couldn't input your second line - the ('ä,ß,ö') was not
> possible via the psql client - just got beeped when I tried to type or
> paste those characters.

If you start "cat" instead of "psql", can you enter those characters?
What about "python" or the shell itself? What terminal do you use?

This doesn't appear to be an issue with PostgreSQL as such, rather
something related to terminal configuration and perhaps readline.

-- 
Florian Weimer
BFK edv-consulting GmbH   http://www.bfk.de/
Kriegsstraße 100  tel: +49-721-96201-1
D-76133 Karlsruhe fax: +49-721-96201-99

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


Re: [GENERAL] Adding German Character Set to PostgresSQL

2012-01-02 Thread Thomas Markus

Hi Hagen,

all german umlaut characters works fine in postgres from my experience.
Seems you have encoding issues between windows tools/console/db-client. 
Use a utf8 capable client. Any java tool or pgadmin or similar are fine.


regards
Thomas


Am 02.01.2012 20:13, schrieb Hagen Finley:


Hi,

I am using psql (8.2.15) and I would like to input German characters 
(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:


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.


Hagen Finley

Boulder, CO





Re: [GENERAL] Adding German Character Set to PostgresSQL

2012-01-02 Thread Adrian Klaver
On Monday, January 02, 2012 6:21:53 pm Hagen Finley wrote:
> Yes but I couldn't input your second line - the  ('ä,ß,ö') was not possible
> via the psql client - just got beeped when I tried to type or paste those
> characters.

Hmmm.
Have you checked what client_encoding is set to in postgresql.conf and whether 
that setting is uncommented?
Is the PGCLIENTENCODING environment variable set?
So what happens when you get the beep, is the character not allowed at all or 
is 
changed?
Is there anything in the server logs?

-- 
Adrian Klaver
adrian.kla...@gmail.com

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


Re: [GENERAL] Adding German Character Set to PostgresSQL

2012-01-02 Thread Hagen Finley
Yes but I couldn't input your second line - the  ('ä,ß,ö') was not possible via 
the psql client - just got beeped when I tried to type or paste those 
characters.

-Original Message-
From: Adrian Klaver [mailto:adrian.kla...@gmail.com] 
Sent: Monday, January 02, 2012 5:54 PM
To: Hagen Finley
Cc: pgsql-general@postgresql.org
Subject: Re: [GENERAL] Adding German Character Set to PostgresSQL

On Monday, January 02, 2012 4:37:18 pm Hagen Finley wrote:
> Yes I am running psql on Centos.
> 
> My psql client won't accept the German characters whether or not I 
> attempt to type them or paste them.
> 

So to be clear did you try?:

create table x(a text);
insert into x values('ä,ß,ö');
SELECT * from x ;

If so can you show the result?
Also maybe tail the log file to see if anything show up there?

--
Adrian Klaver
adrian.kla...@gmail.com



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


Re: [GENERAL] Adding German Character Set to PostgresSQL

2012-01-02 Thread Adrian Klaver
On Monday, January 02, 2012 4:37:18 pm Hagen Finley wrote:
> Yes I am running psql on Centos.
> 
> My psql client won't accept the German characters whether or not I attempt
> to type them or paste them.
> 

So to be clear did you try?:

create table x(a text);
insert into x values('ä,ß,ö');
SELECT * from x ;

If so can you show the result?
Also maybe tail the log file to see if anything show up there?

-- 
Adrian Klaver
adrian.kla...@gmail.com

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


Re: [GENERAL] Adding German Character Set to PostgresSQL

2012-01-02 Thread Hagen Finley
Yes I am running psql on Centos.

My psql client won't accept the German characters whether or not I attempt to 
type them or paste them.

-Original Message-
From: Adrian Klaver [mailto:adrian.kla...@gmail.com] 
Sent: Monday, January 02, 2012 5:05 PM
To: Hagen Finley
Cc: pgsql-general@postgresql.org
Subject: Re: [GENERAL] Adding German Character Set to PostgresSQL

On Monday, January 02, 2012 3:41:40 pm Hagen Finley wrote:
> As you indicated UTF-8 has the whole kitchen sink in it. I did trying 
> using the German Keyboard Layout with a Centos text editor and that 
> works - I can produce the characters I want. Now I can also get the 
> German characters to work in the Centos terminal but not in the psql 
> command line client. Progress but still no joy.

So you are using psql on the Centos machine?

I have the same locale as you, on my Linux machine,  and using Pavels example I
get:

test(5432)aklaver=>create table x(a text); CREATE TABLE 
test(5432)aklaver=>insert into x values('ä,ß,ö'); INSERT 0 1 
test(5432)aklaver=>SELECT * from x ;
   a   
---
 ä,ß,ö
(1 row)

What happens when you do the above on your machine?

> 

--
Adrian Klaver
adrian.kla...@gmail.com



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


Re: [GENERAL] Adding German Character Set to PostgresSQL

2012-01-02 Thread Adrian Klaver
On Monday, January 02, 2012 3:41:40 pm Hagen Finley wrote:
> As you indicated UTF-8 has the whole kitchen sink in it. I did trying using
> the German Keyboard Layout with a Centos text editor and that works - I
> can produce the characters I want. Now I can also get the German
> characters to work in the Centos terminal but not in the psql command line
> client. Progress but still no joy.

So you are using psql on the Centos machine?

I have the same locale as you, on my Linux machine,  and using Pavels example I 
get:

test(5432)aklaver=>create table x(a text);
CREATE TABLE
test(5432)aklaver=>insert into x values('ä,ß,ö');
INSERT 0 1
test(5432)aklaver=>SELECT * from x ;
   a   
---
 ä,ß,ö
(1 row)

What happens when you do the above on your machine?

> 

-- 
Adrian Klaver
adrian.kla...@gmail.com

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


Re: [GENERAL] Adding German Character Set to PostgresSQL

2012-01-02 Thread Hagen Finley
5915@euro
it_IT.utf8
iw_IL
iw_IL.iso88598
iw_IL.utf8
ja_JP
ja_JP.eucjp
ja_JP.ujis
ja_JP.utf8
japanese
japanese.euc
ka_GE
ka_GE.georgianps
ka_GE.utf8
kk_KZ
kk_KZ.pt154
kk_KZ.utf8
kl_GL
kl_GL.iso88591
kl_GL.utf8
km_KH
km_KH.utf8
kn_IN
kn_IN.utf8
ko_KR
ko_KR.euckr
ko_KR.utf8
korean
korean.euc
ku_TR
ku_TR.iso88599
ku_TR.utf8
kw_GB
kw_GB.iso88591
kw_GB.utf8
ky_KG
ky_KG.utf8
lg_UG
lg_UG.iso885910
lg_UG.utf8
lithuanian
lo_LA
lo_LA.utf8
lt_LT
lt_LT.iso885913
lt_LT.utf8
lv_LV
lv_LV.iso885913
lv_LV.utf8
mai_IN
mai_IN.utf8
mg_MG
mg_MG.iso885915
mg_MG.utf8
mi_NZ
mi_NZ.iso885913
mi_NZ.utf8
mk_MK
mk_MK.iso88595
mk_MK.utf8
ml_IN
ml_IN.utf8
mn_MN
mn_MN.utf8
mr_IN
mr_IN.utf8
ms_MY
ms_MY.iso88591
ms_MY.utf8
mt_MT
mt_MT.iso88593
mt_MT.utf8
nb_NO
nb_NO.iso88591
nb_NO.utf8
ne_NP
ne_NP.utf8
nl_BE
nl_BE@euro
nl_BE.iso88591
nl_BE.iso885915@euro
nl_BE.utf8
nl_NL
nl_NL@euro
nl_NL.iso88591
nl_NL.iso885915@euro
nl_NL.utf8
nn_NO
nn_NO.iso88591
nn_NO.utf8
no_NO
no_NO.iso88591
no_NO.utf8
norwegian
nr_ZA
nr_ZA.utf8
nso_ZA
nso_ZA.utf8
nynorsk
oc_FR
oc_FR.iso88591
oc_FR.utf8
om_ET
om_ET.utf8
om_KE
om_KE.iso88591
om_KE.utf8
or_IN
or_IN.utf8
pa_IN
pa_IN.utf8
pa_PK
pa_PK.utf8
pl_PL
pl_PL.iso88592
pl_PL.utf8
polish
portuguese
POSIX
pt_BR
pt_BR.iso88591
pt_BR.utf8
pt_PT
pt_PT@euro
pt_PT.iso88591
pt_PT.iso885915@euro
pt_PT.utf8
romanian
ro_RO
ro_RO.iso88592
ro_RO.utf8
ru_RU
ru_RU.iso88595
ru_RU.koi8r
ru_RU.utf8
russian
ru_UA
ru_UA.koi8u
ru_UA.utf8
rw_RW
rw_RW.utf8
se_NO
se_NO.utf8
sid_ET
sid_ET.utf8
si_LK
si_LK.utf8
sk_SK
sk_SK.iso88592
sk_SK.utf8
slovak
slovene
slovenian
sl_SI
sl_SI.iso88592
sl_SI.utf8
so_DJ
so_DJ.iso88591
so_DJ.utf8
so_ET
so_ET.utf8
so_KE
so_KE.iso88591
so_KE.utf8
so_SO
so_SO.iso88591
so_SO.utf8
spanish
sq_AL
sq_AL.iso88591
sq_AL.utf8
sr_CS
sr_CS.iso88595
sr_CS.utf8
sr_ME
sr_ME.utf8
sr_RS
sr_RS@latin
sr_RS.utf8
sr_RS.utf8@latin
ss_ZA
ss_ZA.utf8
st_ZA
st_ZA.iso88591
st_ZA.utf8
sv_FI
sv_FI@euro
sv_FI.iso88591
sv_FI.iso885915@euro
sv_FI.utf8
sv_SE
sv_SE.iso88591
sv_SE.iso885915
sv_SE.utf8
swedish
ta_IN
ta_IN.utf8
te_IN
te_IN.utf8
tg_TJ
tg_TJ.koi8t
tg_TJ.utf8
thai
th_TH
th_TH.tis620
th_TH.utf8
ti_ER
ti_ER.utf8
ti_ET
ti_ET.utf8
tig_ER
tig_ER.utf8
tl_PH
tl_PH.iso88591
tl_PH.utf8
tn_ZA
tn_ZA.utf8
tr_CY
tr_CY.iso88599
tr_CY.utf8
tr_TR
tr_TR.iso88599
tr_TR.utf8
ts_ZA
ts_ZA.utf8
tt_RU.utf8
turkish
uk_UA
uk_UA.koi8u
uk_UA.utf8
ur_PK
ur_PK.utf8
uz_UZ
uz_UZ@cyrillic
uz_UZ.iso88591
uz_UZ.utf8@cyrillic
ve_ZA
ve_ZA.utf8
vi_VN
vi_VN.tcvn
vi_VN.utf8
wa_BE
wa_BE@euro
wa_BE.iso88591
wa_BE.iso885915@euro
wa_BE.utf8
xh_ZA
xh_ZA.iso88591
xh_ZA.utf8
yi_US
yi_US.cp1255
yi_US.utf8
zh_CN
zh_CN.gb18030
zh_CN.gb2312
zh_CN.gbk
zh_CN.utf8
zh_HK
zh_HK.big5hkscs
zh_HK.utf8
zh_SG
zh_SG.gb2312
zh_SG.gbk
zh_SG.utf8
zh_TW
zh_TW.big5
zh_TW.euctw
zh_TW.utf8
zu_ZA
zu_ZA.iso88591
zu_ZA.utf8
[gpadmin@gp-single-host ~]$ 


-Original Message-
From: Adrian Klaver [mailto:adrian.kla...@gmail.com] 
Sent: Monday, January 02, 2012 2:59 PM
To: pgsql-general@postgresql.org
Cc: Hagen Finley; 'Hannes Erven'
Subject: Re: [GENERAL] Adding German Character Set to PostgresSQL

On Monday, January 02, 2012 1:47:13 pm Hagen Finley wrote:
> Hannes,
> 
> The output of \l is:
> 
> gpdemo=# \l
>List of databases
> Name|  Owner  | Encoding |  Access privileges
> +-+--+-
>  acn| gpadmin | UTF8 |
>  gpdemo  | gpadmin | UTF8 |
>  philosophy | gpadmin | UTF8 |
>  postgres | gpadmin | UTF8 |
>  template0  | gpadmin | UTF8 | =c/gpadmin  : gpadmin=CTc/gpadmin
>  template1  | gpadmin | UTF8 | =c/gpadmin   : gpadmin=CTc/gpadmin
> 
> It would be easy enough to create a new database with a different 
> encoding
> - only one record in the one in question. However, it sounded as 
> though you don't believe that is the issue - that UTF8 ought to 
> support the German characters I want. Am I understanding you correctly?

So now we have established where it is going to. Now to find out where it is 
coming from. You said the server is running on Centos and that it was 
presumably set up for a German keyboard.
From a terminal in Centos what do the below show?
locale
locale -a


> 
> Hagen
> 

--
Adrian Klaver
adrian.kla...@gmail.com



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


Re: [GENERAL] Adding German Character Set to PostgresSQL

2012-01-02 Thread Hannes Erven
Hi Hagen,


>  gpdemo  | gpadmin | UTF8 | 
> that UTF8 ought to support the German characters I want. 
> Am I understanding you correctly?

Yes, UTF-8 supports all the characters you'd want -- Wikipedia says it's
about 109.000 characters from 93 scripts, so that's pretty everything
you might need ( http://en.wikipedia.org/wiki/Unicode ).


So as we have excluded the database storage and the psql connection,
there seems to be only the terminal left as a suspect. Could you try
using pgAdmin or any other non-console based tool to connect to the
database in question?

The plain text you first posted looked quite strange, repeating previous
parts of the strings before the Umlauts -- usually, unsupported Umlauts
show up rather as two characters, or cut off the rest of the word
completely.
My guess would be that the characters are correctly stored in the DB,
and are just not displayed correctly within your terminal.

But again, this is best verified when you connect directly to the DB. I
don't know anything about terminals in CentOS, but have you tried
setting the LANG variable?
http://www.linuxreport.org/content/view/53/31/



Good luck :-)

-hannes

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


Re: [GENERAL] Adding German Character Set to PostgresSQL

2012-01-02 Thread Adrian Klaver
On Monday, January 02, 2012 1:47:13 pm Hagen Finley wrote:
> Hannes,
> 
> The output of \l is:
> 
> gpdemo=# \l
>List of databases
> Name|  Owner  | Encoding |  Access privileges
> +-+--+-
>  acn| gpadmin | UTF8 |
>  gpdemo  | gpadmin | UTF8 |
>  philosophy | gpadmin | UTF8 |
>  postgres | gpadmin | UTF8 |
>  template0  | gpadmin | UTF8 | =c/gpadmin  : gpadmin=CTc/gpadmin
>  template1  | gpadmin | UTF8 | =c/gpadmin   : gpadmin=CTc/gpadmin
> 
> It would be easy enough to create a new database with a different encoding
> - only one record in the one in question. However, it sounded as though
> you don't believe that is the issue - that UTF8 ought to support the
> German characters I want. Am I understanding you correctly?

So now we have established where it is going to. Now to find out where it is 
coming from. You said the server is running on Centos and that it was 
presumably 
set up for a German keyboard.
From a terminal in Centos what do the below show?
locale
locale -a


> 
> Hagen
> 

-- 
Adrian Klaver
adrian.kla...@gmail.com

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


Re: [GENERAL] Adding German Character Set to PostgresSQL

2012-01-02 Thread Hagen Finley
Hannes,

The output of \l is:

gpdemo=# \l
   List of databases
Name|  Owner  | Encoding |  Access privileges  
+-+--+-
 acn| gpadmin | UTF8 | 
 gpdemo  | gpadmin | UTF8 | 
 philosophy | gpadmin | UTF8 | 
 postgres | gpadmin | UTF8 | 
 template0  | gpadmin | UTF8 | =c/gpadmin  : gpadmin=CTc/gpadmin
 template1  | gpadmin | UTF8 | =c/gpadmin   : gpadmin=CTc/gpadmin

It would be easy enough to create a new database with a different encoding -
only one record in the one in question. However, it sounded as though you
don't believe that is the issue - that UTF8 ought to support the German
characters I want. Am I understanding you correctly?

Hagen


-Original Message-
From: Hannes Erven [mailto:han...@erven.at] 
Sent: Monday, January 02, 2012 1:53 PM
To: pgsql-general@postgresql.org
Cc: finha...@comcast.net
Subject: Re: [GENERAL] Adding German Character Set to PostgresSQL

Hagen,


> gpdemo=# \encoding
> UTF8

UTF8 includes virtually all characters you will need for any purpose  on the
earth.


But: you showed the output of \encoding when you were asked to show \l .

There is a subtle difference:
\encoding shows the encoding of the connection between psql and the server;
while \l shows the encoding the database server will actually store the data
in.

While the first can easily be changed for a session, the latter can only be
set when creating a database (or a cluster).


-hannes



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


Re: [GENERAL] Adding German Character Set to PostgresSQL

2012-01-02 Thread Adrian Klaver
On Monday, January 02, 2012 12:25:26 pm Hagen Finley wrote:
> Thanks Adrian,
> 
> 
> 
> Looks like I am currently using UTF8:
> 
> 
> 
> gpdemo=# \encoding
> 
> UTF8


Well that shows the client encoding not the server encoding.

For that either do 
\l
or
show server_encoding;

> 
> 
> 
> And it looks like UTF8 doesn’t include the German characters I seek. Can
> someone explain how I can switch to -0FFF which looks like the Basic
> Multilingual Plane Unicode which does include the characters I want?

It should.

> 
> 
> 
> Hagen
> 
> 
> 


-- 
Adrian Klaver
adrian.kla...@gmail.com

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


Re: [GENERAL] Adding German Character Set to PostgresSQL

2012-01-02 Thread Hannes Erven
Hagen,


> gpdemo=# \encoding
> UTF8

UTF8 includes virtually all characters you will need for any purpose  on
the earth.


But: you showed the output of \encoding when you were asked to show \l .

There is a subtle difference:
\encoding shows the encoding of the connection between psql and the
server; while
\l shows the encoding the database server will actually store the data in.

While the first can easily be changed for a session, the latter can only
be set when creating a database (or a cluster).


-hannes

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


Re: [GENERAL] Adding German Character Set to PostgresSQL

2012-01-02 Thread Pavel Stehule
Hello

2012/1/2 Hagen Finley :
> 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 -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.kla...@gmail.com]
> Sent: Monday, January 02, 2012 12:40 PM
> To: Hagen Finley
> Cc: pgsql-general@postgresql.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.kla...@gmail.com

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


Re: [GENERAL] Adding German Character Set to PostgresSQL

2012-01-02 Thread Hagen Finley
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 -0FFF which looks like the Basic
Multilingual Plane Unicode which does include the characters I want?

 

Hagen

 

 

 

-Original Message-
From: Adrian Klaver [mailto:adrian.kla...@gmail.com] 
Sent: Monday, January 02, 2012 12:40 PM
To: Hagen Finley
Cc: pgsql-general@postgresql.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

 <mailto:adrian.kla...@gmail.com> adrian.kla...@gmail.com



Re: [GENERAL] Adding German Character Set to PostgresSQL

2012-01-02 Thread Adrian Klaver

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.kla...@gmail.com

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


[GENERAL] Adding German Character Set to PostgresSQL

2012-01-02 Thread Hagen Finley
Hi,

 

I am using psql (8.2.15) and I would like to input German characters (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:

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.

 

Hagen Finley

 

Boulder, CO