Thread: PLEASE: I really need german characters

PLEASE: I really need german characters

From
"Gunnar Groetschel"
Date:
It is impossible, that none of you have problems with this!!!
Best regards
Gunnar


[Gunnar Groetschel] > Hi List
[Gunnar Groetschel] > I have a question, that should be in the FAQs, but i didnt found it.
[Gunnar Groetschel] > I am trying to connect a postgres database with access 2000 over the latest odbc driver.
[Gunnar Groetschel] > Everything works fine and i am able to see the tables in access, but without any german
characters[Gunnar Groetschel] > äöüÄÖÜ.  
[Gunnar Groetschel] > Where can i change these settings?
[Gunnar Groetschel] > best regards
[Gunnar Groetschel] > Gunnar

Re: PLEASE: I really need german characters

From
"Dave Page"
Date:
Have you tried the Unicode driver?

Regards, Dave.

> -----Original Message-----
> From: Gunnar Groetschel [mailto:ggroetschel@sokoma.de]
> Sent: 02 December 2003 10:55
> To: pgsql-odbc@postgresql.org
> Subject: [ODBC] PLEASE: I really need german characters
>
> It is impossible, that none of you have problems with this!!!
> Best regards
> Gunnar
>
>
> [Gunnar Groetschel] > Hi List
> [Gunnar Groetschel] > I have a question, that should be in
> the FAQs, but i didnt found it.
> [Gunnar Groetschel] > I am trying to connect a postgres
> database with access 2000 over the latest odbc driver.
> [Gunnar Groetschel] > Everything works fine and i am able to
> see the tables in access, but without any german characters
> [Gunnar Groetschel] > äöüÄÖÜ.
> [Gunnar Groetschel] > Where can i change these settings?
> [Gunnar Groetschel] > best regards
> [Gunnar Groetschel] > Gunnar
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
>                http://www.postgresql.org/docs/faqs/FAQ.html
>

Re: PLEASE: I really need german characters

From
"Markus Donath"
Date:
Hello,

try encoding your database in latin-9 encoding. i think the default is
sql_ascii.
check the manual on how to set the encoding, i don't know how exactly how to
do it (i think you can set the encoding when copying a database). For me, it
fixed a similar problem with ADO and PGAdmin III.

bye,
markus.





""Gunnar Groetschel"" <ggroetschel@sokoma.de> schrieb im Newsbeitrag
news:CCD5F31905BC4F43984EAB37695E0B3C2EC1@helios.Sokoma.local...
> It is impossible, that none of you have problems with this!!!
> Best regards
> Gunnar
>
>
> [Gunnar Groetschel] > Hi List
> [Gunnar Groetschel] > I have a question, that should be in the FAQs, but i
didnt found it.
> [Gunnar Groetschel] > I am trying to connect a postgres database with
access 2000 over the latest odbc driver.
> [Gunnar Groetschel] > Everything works fine and i am able to see the
tables in access, but without any german characters [Gunnar Groetschel] >
������.
> [Gunnar Groetschel] > Where can i change these settings?
> [Gunnar Groetschel] > best regards
> [Gunnar Groetschel] > Gunnar
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
>                http://www.postgresql.org/docs/faqs/FAQ.html
>



Re: PLEASE: I really need german characters

From
"Gunnar Groetschel"
Date:
Nothing worked.
I have now tried a few things and nothing helped.

There must be a bug in the ODBC Driver!!!

If i use PGAdmin III to connect to the database i see "Umlaute" (=äöüÄÖÜ) CORRECT!
If i use the odbc driver i see only sh** (Möller should be Müller).
If i use psql on my linux box, i also can see all the (Umlaute) correct.
psql -l shows me, that the database is in SQL_ASCII (what should be ok - after 2 hours reading manual pages).

I have tried to encode the database in Latin9, Latin2, Windows1256 and unicode - didn't help
I have compiled the new 7.4 database - didn't help
I have set the clien_encoding parameter in postgres.conf - didn't help
I have written a VB Script (you can see it above) to access the database - didn't help

I am really +*++a#? with this sh*** odbc driver :-))

Best regards
Gunnar

############################
Dim conn As ADODB.Connection
Dim rs As ADODB.Recordset
Set conn = New ADODB.Connection
conn.ConnectionString =
"DRIVER={PostgreSQL};SERVER=192.168.1.117;DATABASE=ixkaizen_import;PORT=5432;UID=postgres;CONNSETTINGS=SET
CLIENT_ENCODINGTO 'LATIN9';" 
conn.Open
Set rs = New ADODB.Recordset
rs.CursorLocation = adUseClient
rs.Open "select str_name from xcrm_contactb0d6d496 where str_name like 'M%'", conn, adOpenDynamic, adLockOptimistic
Do While Not rs.EOF
    Debug.Print rs!str_name
rs.MoveNext
Loop

Re: PLEASE: I really need german characters

From
"Philippe Lang"
Date:
You have to encode the database in Latin1... It works perfectly with the latest driver.

-----Message d'origine-----
De : pgsql-odbc-owner@postgresql.org
[mailto:pgsql-odbc-owner@postgresql.org]De la part de Gunnar Groetschel
Envoyé : jeudi, 4. décembre 2003 12:35
À : Pgsql-Odbc (E-Mail)
Objet : Re: [ODBC] PLEASE: I really need german characters


Nothing worked.
I have now tried a few things and nothing helped.

There must be a bug in the ODBC Driver!!!

If i use PGAdmin III to connect to the database i see "Umlaute" (=äöüÄÖÜ) CORRECT!
If i use the odbc driver i see only sh** (Möller should be Müller).
If i use psql on my linux box, i also can see all the (Umlaute) correct.
psql -l shows me, that the database is in SQL_ASCII (what should be ok - after 2 hours reading manual pages).

I have tried to encode the database in Latin9, Latin2, Windows1256 and unicode - didn't help
I have compiled the new 7.4 database - didn't help
I have set the clien_encoding parameter in postgres.conf - didn't help
I have written a VB Script (you can see it above) to access the database - didn't help

I am really +*++a#? with this sh*** odbc driver :-))

Best regards
Gunnar

############################
Dim conn As ADODB.Connection
Dim rs As ADODB.Recordset
Set conn = New ADODB.Connection
conn.ConnectionString =
"DRIVER={PostgreSQL};SERVER=192.168.1.117;DATABASE=ixkaizen_import;PORT=5432;UID=postgres;CONNSETTINGS=SET
CLIENT_ENCODINGTO 'LATIN9';" 
conn.Open
Set rs = New ADODB.Recordset
rs.CursorLocation = adUseClient
rs.Open "select str_name from xcrm_contactb0d6d496 where str_name like 'M%'", conn, adOpenDynamic, adLockOptimistic
Do While Not rs.EOF
    Debug.Print rs!str_name
rs.MoveNext
Loop

---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

Re: PLEASE: I really need german characters

From
"Gunnar Groetschel"
Date:
How do i do that?
Shall i make a dump of the database?
Recreate the database with: createdb -E LATIN1 database
and put the dump back to the database?
Do you have something in your ConnectString in the ODBC Driver on page 2 of the datasource?
Gunnar


-----Ursprüngliche Nachricht-----
Von: Philippe Lang [mailto:philippe.lang@attiksystem.ch]
Gesendet: Donnerstag, 4. Dezember 2003 13:28
An: Gunnar Groetschel; Pgsql-Odbc (E-Mail)
Betreff: RE: [ODBC] PLEASE: I really need german characters


You have to encode the database in Latin1... It works perfectly with the latest driver.

-----Message d'origine-----
De : pgsql-odbc-owner@postgresql.org
[mailto:pgsql-odbc-owner@postgresql.org]De la part de Gunnar Groetschel
Envoyé : jeudi, 4. décembre 2003 12:35
À : Pgsql-Odbc (E-Mail)
Objet : Re: [ODBC] PLEASE: I really need german characters


Nothing worked.
I have now tried a few things and nothing helped.

There must be a bug in the ODBC Driver!!!

If i use PGAdmin III to connect to the database i see "Umlaute" (=äöüÄÖÜ) CORRECT!
If i use the odbc driver i see only sh** (Möller should be Müller).
If i use psql on my linux box, i also can see all the (Umlaute) correct.
psql -l shows me, that the database is in SQL_ASCII (what should be ok - after 2 hours reading manual pages).

I have tried to encode the database in Latin9, Latin2, Windows1256 and unicode - didn't help
I have compiled the new 7.4 database - didn't help
I have set the clien_encoding parameter in postgres.conf - didn't help
I have written a VB Script (you can see it above) to access the database - didn't help

I am really +*++a#? with this sh*** odbc driver :-))

Best regards
Gunnar

############################
Dim conn As ADODB.Connection
Dim rs As ADODB.Recordset
Set conn = New ADODB.Connection
conn.ConnectionString =
"DRIVER={PostgreSQL};SERVER=192.168.1.117;DATABASE=ixkaizen_import;PORT=5432;UID=postgres;CONNSETTINGS=SET
CLIENT_ENCODINGTO 'LATIN9';" 
conn.Open
Set rs = New ADODB.Recordset
rs.CursorLocation = adUseClient
rs.Open "select str_name from xcrm_contactb0d6d496 where str_name like 'M%'", conn, adOpenDynamic, adLockOptimistic
Do While Not rs.EOF
    Debug.Print rs!str_name
rs.MoveNext
Loop

---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

Re: PLEASE: I really need german characters

From
"Philippe Lang"
Date:
I recreated the whole database, personnally, yes. That's the best thing to do, I think.

Philippe Lang

-----Message d'origine-----
De : pgsql-odbc-owner@postgresql.org
[mailto:pgsql-odbc-owner@postgresql.org]De la part de Gunnar Groetschel
Envoyé : jeudi, 4. décembre 2003 13:35
À : Pgsql-Odbc (E-Mail)
Objet : Re: [ODBC] PLEASE: I really need german characters


How do i do that?
Shall i make a dump of the database?
Recreate the database with: createdb -E LATIN1 database
and put the dump back to the database?
Do you have something in your ConnectString in the ODBC Driver on page 2 of the datasource?
Gunnar


-----Ursprüngliche Nachricht-----
Von: Philippe Lang [mailto:philippe.lang@attiksystem.ch]
Gesendet: Donnerstag, 4. Dezember 2003 13:28
An: Gunnar Groetschel; Pgsql-Odbc (E-Mail)
Betreff: RE: [ODBC] PLEASE: I really need german characters


You have to encode the database in Latin1... It works perfectly with the latest driver.

-----Message d'origine-----
De : pgsql-odbc-owner@postgresql.org
[mailto:pgsql-odbc-owner@postgresql.org]De la part de Gunnar Groetschel
Envoyé : jeudi, 4. décembre 2003 12:35
À : Pgsql-Odbc (E-Mail)
Objet : Re: [ODBC] PLEASE: I really need german characters


Nothing worked.
I have now tried a few things and nothing helped.

There must be a bug in the ODBC Driver!!!

If i use PGAdmin III to connect to the database i see "Umlaute" (=äöüÄÖÜ) CORRECT!
If i use the odbc driver i see only sh** (Möller should be Müller).
If i use psql on my linux box, i also can see all the (Umlaute) correct.
psql -l shows me, that the database is in SQL_ASCII (what should be ok - after 2 hours reading manual pages).

I have tried to encode the database in Latin9, Latin2, Windows1256 and unicode - didn't help
I have compiled the new 7.4 database - didn't help
I have set the clien_encoding parameter in postgres.conf - didn't help
I have written a VB Script (you can see it above) to access the database - didn't help

I am really +*++a#? with this sh*** odbc driver :-))

Best regards
Gunnar

############################
Dim conn As ADODB.Connection
Dim rs As ADODB.Recordset
Set conn = New ADODB.Connection
conn.ConnectionString =
"DRIVER={PostgreSQL};SERVER=192.168.1.117;DATABASE=ixkaizen_import;PORT=5432;UID=postgres;CONNSETTINGS=SET
CLIENT_ENCODINGTO 'LATIN9';" 
conn.Open
Set rs = New ADODB.Recordset
rs.CursorLocation = adUseClient
rs.Open "select str_name from xcrm_contactb0d6d496 where str_name like 'M%'", conn, adOpenDynamic, adLockOptimistic
Do While Not rs.EOF
    Debug.Print rs!str_name
rs.MoveNext
Loop

---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
      joining column's datatypes do not match

Re: PLEASE: I really need german characters

From
Benjamin Riefenstahl
Date:
Hi Gunnar,


"Gunnar Groetschel" <ggroetschel@sokoma.de> writes:
> If i use the odbc driver i see only sh** (Möller should be Müller).

That looks like UTF-8.

> psql -l shows me, that the database is in SQL_ASCII (what should be
> ok - after 2 hours reading manual pages).

I haven't read the manual for this, but strictly speaking "ASCII"
means, that you don't have umlauts at all, or rather that their
encoding is undefined.  Which is not good for a stable database,
because with any update of any tool, that tool can change its internal
default interpretation and potentially start corrupting data.  You
really do want a database encoding that supports your data explicitly.

Some ODBC-based tools let you configure how to encode data going in
and out of the ODBC API.  Also in the past I have had success with
issuing

  SET CLIENT_ENCODING TO 'UNICODE'

on the connection once to get the data in UTF-8.  You may want to see,
if a similar statement can be used to change the DB interface encoding
to Latin-1 or Windows-1252.


benny


Re: PLEASE: I really need german characters

From
"Gunnar Groetschel"
Date:
Thanks very much for your help.
You are right its UTF-8.
I have tried all "SET CLIENT_ENCODING TO '*'" but nothin worked.
There is an error and i don't find it.
PGAdmin III (also on Windows) works fine so i am testing now what encoding PGAdmin III is using.
I have set up the debugging and PGAdmin says that it is using the SQL_ASCII encoding. All the Umlauts are there. This
isreally curious.  
I am too tired to find the error today and go home now.
Thanks for any help
Best regards
Gunnar



-----Ursprüngliche Nachricht-----
Von: Benjamin Riefenstahl [mailto:Benjamin.Riefenstahl@epost.de]
Gesendet: Donnerstag, 4. Dezember 2003 15:37
An: Gunnar Groetschel
Cc: Pgsql-Odbc (E-Mail)
Betreff: Re: PLEASE: I really need german characters


Hi Gunnar,


"Gunnar Groetschel" <ggroetschel@sokoma.de> writes:
> If i use the odbc driver i see only sh** (Möller should be Müller).

That looks like UTF-8.

> psql -l shows me, that the database is in SQL_ASCII (what should be
> ok - after 2 hours reading manual pages).

I haven't read the manual for this, but strictly speaking "ASCII"
means, that you don't have umlauts at all, or rather that their
encoding is undefined.  Which is not good for a stable database,
because with any update of any tool, that tool can change its internal
default interpretation and potentially start corrupting data.  You
really do want a database encoding that supports your data explicitly.

Some ODBC-based tools let you configure how to encode data going in
and out of the ODBC API.  Also in the past I have had success with
issuing

  SET CLIENT_ENCODING TO 'UNICODE'

on the connection once to get the data in UTF-8.  You may want to see,
if a similar statement can be used to change the DB interface encoding
to Latin-1 or Windows-1252.


benny


Re: PLEASE: I really need german characters

From
"Philippe Lang"
Date:
Gunnar,

1. pg_dump dbname > backup_dump_file

2. Drop your database

3. CREATE DATABASE dbname WITH ENCODING = 'LATIN1'

4. psql dbname < backup_dump_file


That's all!

Philippe


-----Message d'origine-----
De : pgsql-odbc-owner@postgresql.org
[mailto:pgsql-odbc-owner@postgresql.org]De la part de Gunnar Groetschel
Envoyé : jeudi, 4. décembre 2003 17:24
À : Pgsql-Odbc (E-Mail)
Objet : Re: [ODBC] PLEASE: I really need german characters


Thanks very much for your help.
You are right its UTF-8.
I have tried all "SET CLIENT_ENCODING TO '*'" but nothin worked.
There is an error and i don't find it.
PGAdmin III (also on Windows) works fine so i am testing now what encoding PGAdmin III is using.
I have set up the debugging and PGAdmin says that it is using the SQL_ASCII encoding. All the Umlauts are there. This
isreally curious.  
I am too tired to find the error today and go home now.
Thanks for any help
Best regards
Gunnar



-----Ursprüngliche Nachricht-----
Von: Benjamin Riefenstahl [mailto:Benjamin.Riefenstahl@epost.de]
Gesendet: Donnerstag, 4. Dezember 2003 15:37
An: Gunnar Groetschel
Cc: Pgsql-Odbc (E-Mail)
Betreff: Re: PLEASE: I really need german characters


Hi Gunnar,


"Gunnar Groetschel" <ggroetschel@sokoma.de> writes:
> If i use the odbc driver i see only sh** (Möller should be Müller).

That looks like UTF-8.

> psql -l shows me, that the database is in SQL_ASCII (what should be
> ok - after 2 hours reading manual pages).

I haven't read the manual for this, but strictly speaking "ASCII"
means, that you don't have umlauts at all, or rather that their
encoding is undefined.  Which is not good for a stable database,
because with any update of any tool, that tool can change its internal
default interpretation and potentially start corrupting data.  You
really do want a database encoding that supports your data explicitly.

Some ODBC-based tools let you configure how to encode data going in
and out of the ODBC API.  Also in the past I have had success with
issuing

  SET CLIENT_ENCODING TO 'UNICODE'

on the connection once to get the data in UTF-8.  You may want to see,
if a similar statement can be used to change the DB interface encoding
to Latin-1 or Windows-1252.


benny


---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org

Re: PLEASE: I really need german characters

From
Benjamin Riefenstahl
Date:
Hi Gunnar,

"Gunnar Groetschel" <ggroetschel@sokoma.de> writes:
> I have tried all "SET CLIENT_ENCODING TO '*'" but nothin worked.

Well, this has definitly an effect here in my installation with
SERVER_ENCODING=UNICODE.  It's possible though, that PostgreSQL treats
a conversion from SERVER_ENCODING=SQL_ASCII to CLIENT_ENCODING=LATIN1
or any other encoding as a no-op, which is not surprising.  Try to
setup your database as UNICODE or LATIN1 and see if SET
CLIENT_ENCODING works than.

> I have set up the debugging and PGAdmin says that it is using the
> SQL_ASCII encoding. All the Umlauts are there. This is really
> curious.

To repeat: "ASCII" means "there are no umlauts, and if you insist on
putting random 8-bit characters into the database, you are on your
own."  There is nothing curious about that this works in some
applications and doesn't work in others.  Unless I am missing
something here.

benny


Re: PLEASE: I really need german characters

From
Gunnar Groetschel
Date:
Thanks very much for your help.
Its working now.
I have changed the server encoding from SQL_ASCII (standard) to UNICODE.
And now i am able to set the client_encoding to latin1 to see my lovely
Umlauts!

Thanks very much. Both of you!!
Gunnar


Am Don, den 04.12.2003 schrieb Benjamin Riefenstahl um 18:05:
> Hi Gunnar,
>
> "Gunnar Groetschel" <ggroetschel@sokoma.de> writes:
> > I have tried all "SET CLIENT_ENCODING TO '*'" but nothin worked.
>
> Well, this has definitly an effect here in my installation with
> SERVER_ENCODING=UNICODE.  It's possible though, that PostgreSQL treats
> a conversion from SERVER_ENCODING=SQL_ASCII to CLIENT_ENCODING=LATIN1
> or any other encoding as a no-op, which is not surprising.  Try to
> setup your database as UNICODE or LATIN1 and see if SET
> CLIENT_ENCODING works than.
>
> > I have set up the debugging and PGAdmin says that it is using the
> > SQL_ASCII encoding. All the Umlauts are there. This is really
> > curious.
>
> To repeat: "ASCII" means "there are no umlauts, and if you insist on
> putting random 8-bit characters into the database, you are on your
> own."  There is nothing curious about that this works in some
> applications and doesn't work in others.  Unless I am missing
> something here.
>
> benny
--
Gunnar Groetschel
Sokoma GmbH
Tel.: 069 92008023