> -----Original Message-----
> From: Adam H.Pendleton [mailto:[EMAIL PROTECTED] 
> Sent: 25 June 2003 03:02
> To: [EMAIL PROTECTED]
> Subject: [pgadmin-hackers] pgConn.cpp.patch
> 
> 
> This patch fixes a bug in the error reporting of the new connection 
> dialog when setting the database encoding.

Hi Adam,

I don't believe this patch is correct. PQsetClientEncoding returns 0 on
success and -1 on failure [1], therefore !PQsetClientEncoding is true
upon success.

-       if (PQsetClientEncoding(conn, "UNICODE"))
+       if (!PQsetClientEncoding(conn, "UNICODE"))
            wxLogError(wxT("%s"), wxString(PQerrorMessage(conn),
wxConvUTF8).c_str());

Patch NOT applied.

Regards, Dave.

[1]
http://www.postgresql.org/docs/view.php?version=7.3&idoc=0&file=multibyt
e.html

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]

Reply via email to