Re: [BUGS] Degrade(character conversion problem) - Mailing list pgadmin-hackers

From Andreas Pflug
Subject Re: [BUGS] Degrade(character conversion problem)
Date
Msg-id 3F852E58.7040701@pse-consulting.de
Whole thread Raw
In response to Re: [BUGS] Degrade(character conversion problem) pga3?  ("Hiroshi Saito" <saito@inetrt.skcapi.co.jp>)
List pgadmin-hackers
Hiroshi Saito wrote:

>Hi Andreas.
>
>It was ascertained.
>The timing of constructer of pgConn isn't suitable for it.
>It tried to trace it in let's as below.
>----------------------------------------------------
>pgSet *pgConn::ExecuteSet(const wxString& sql)
>{
>    // Execute the query and get the status.
>    PGresult *qryRes;
>    wxLogSql(wxT("Set query (%s:%d): %s"), this->GetHost().c_str(), this->GetPort(), sql.c_str());
> if (&conv == &wxConvUTF8)
>  wxLogSql(wxT("DEBUG: conv=>wxConvUTF8"));
> else
>  if (&conv == &wxConvLibc)
>   wxLogSql(wxT("DEBUG: conv=>wxConvLibc"));
>  else
>   wxLogSql(wxT("DEBUG: conv=>others"));
>
>  qryRes = PQexec(conn, sql.mb_str(conv));
>-------------------------------------------------------
>All results are "DEBUG: conv=>wxConvLibc".
>I think how it will be modified.....
>
>

In the constructor of pgConn (line 152ff), the server encoding is
checked, and the client encoding is set to UNICODE if the server doesn't
use SQL_ASCII. If everything's successful, you should see a "Setting
client_encoding to 'UNICODE'.
I lost your log, and you didn't post it on pgadmin-hackers, so I can't
check myself.

Regards,
Andreas



pgadmin-hackers by date:

Previous
From: "Hiroshi Saito"
Date:
Subject: Re: [BUGS] Degrade(character conversion problem) pga3?
Next
From: "Adam H. Pendleton"
Date:
Subject: acinclude patch