Обсуждение: ConnSettings

Поиск
Список
Период
Сортировка

ConnSettings

От
"claus"
Дата:
Hello list,

I am trying to convince pgadmin 1.6.0 to display my Unicode encode databases
as WIN1250 per default
(not launching a SET CLIENT ENCODING command on each connection).
The problem is that pgadmin does not use a DNS but uses ODBC "dynamically"
setting up the connection string by explicitely.

First I looked after an environment variable but in vain there are only env variables for the
DB itself.

Then I found the registry entry
    HKLM\SOFTWARE\ODBC\ODBCINST.INI\PostgreSQL\ConnSettings
even though there is no way to change it using a UI with regedit I set it to
    "SET+CLIENT%5fENCODING+%3d+%27WIN1250%27%3b"
the same value as set when using the UI on a particular DNS.

I saw that the registry value is read (using regmon) but it does not seem
to be used when opening the connection
(connection strings in logfiles and db properties in pgadmin)

As anyone an idea to fix this encoding problem or should I file a bug report ?

Thank you and regards,
Claus



Re: ConnSettings

От
"Dave Page"
Дата:

> -----Original Message-----
> From: claus [mailto:ch@greenmail.ch]
> Sent: 14 August 2003 13:46
> To: pgadmin-hackers@postgresql.org
> Subject: [pgadmin-hackers] ConnSettings
>
>
> Hello list,
>
> I am trying to convince pgadmin 1.6.0 to display my Unicode
> encode databases
> as WIN1250 per default
> (not launching a SET CLIENT ENCODING command on each
> connection). The problem is that pgadmin does not use a DNS
> but uses ODBC "dynamically" setting up the connection string
> by explicitely.

Hello,

The problem is not the DSNless connection, but rather the fact the VB
(in which pga2 is written) will not handle Unicode. Beleive me, if it
did, the connection string would be set as required :-)

If you wish to use Unicode, you can do so in pgAdmin III which can be
downlaoded at http://www.pgadmin.org/pgadmin3/download.php. The most
recent release is beta 1, but it's pretty stable now for most tasks. Bug
reports for issues you may find are appreciated though!

Regards, Dave.

Re: ConnSettings

От
"claus"
Дата:
OK I will try pgadmin III beta I think it is stable enough for me.

Nevertheless if I execute
    SET CLIENT_ENCODING = LATIN1;
in an SQL Window the character display is fine even in pgadmin II
since the translation is (I guess) done by the server process and
vb just diplays character it can display.
So I thought the ConnSetting does the same but it seems not
to be used.

Thank you,
Claus

----- Original Message -----
From: "Dave Page" <dpage@vale-housing.co.uk>
<snip>
The problem is not the DSNless connection, but rather the fact the VB
(in which pga2 is written) will not handle Unicode. Beleive me, if it
did, the connection string would be set as required :-)
<snip>


Re: ConnSettings

От
"Dave Page"
Дата:

> -----Original Message-----
> From: claus [mailto:ch@greenmail.ch]
> Sent: 14 August 2003 14:15
> To: pgadmin-hackers@postgresql.org
> Cc: Dave Page
> Subject: Re: [pgadmin-hackers] ConnSettings
>
>
> OK I will try pgadmin III beta I think it is stable enough for me.
>
> Nevertheless if I execute
>     SET CLIENT_ENCODING = LATIN1;
> in an SQL Window the character display is fine even in
> pgadmin II since the translation is (I guess) done by the
> server process and vb just diplays character it can display.
> So I thought the ConnSetting does the same but it seems not
> to be used.

It depends on the character set. It'll most likely fail miserably if you
have multibyte charactersets such as EUC_JP or JOHAB.

Regards, Dave.