> Should we actually be checking *for* SQL_ASCII, and requiring
> it? I wonder
> if, say, EUC_JP encoding would break the heck out of DBMail...
Yes, definately,....
Replace with:
/* UNICODE is broken prior to 8.1 and SQL_ASCII should be used for all
others */
int version = PQServerVersion(conn);
int enc = PGclientEncoding(conn);
if(
(version < 80100 && enc != PG_SQL_ASCII) ||
(version >= 80100 && enc != PG_SQL_ASCII && enc != PG_UTF8)
) {
trace(FATAL, "Database encoding type %s is not
supported",
pg_encoding_to_char(enc)
);
}
... John