diff options
author | Bruce Momjian <bruce@momjian.us> | 2006-08-22 03:38:13 +0000 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 2006-08-22 03:38:13 +0000 |
commit | d16e2ceb597c121fc25e97133ac92d44d5b08d7b (patch) | |
tree | 5abbaf2a7fb0606e9504bb74316815bf40230bc7 | |
parent | 574878f11093959efb1709ce16db9c4daea9403f (diff) | |
download | postgresql-d16e2ceb597c121fc25e97133ac92d44d5b08d7b.tar.gz postgresql-d16e2ceb597c121fc25e97133ac92d44d5b08d7b.zip |
Add hint for "invalid byte sequence for encoding" error message,
suggesting review of client_encoding.
-rw-r--r-- | src/backend/utils/mb/wchar.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/backend/utils/mb/wchar.c b/src/backend/utils/mb/wchar.c index 4e40bc60f1d..5635b7320d6 100644 --- a/src/backend/utils/mb/wchar.c +++ b/src/backend/utils/mb/wchar.c @@ -1,7 +1,7 @@ /* * conversion functions between pg_wchar and multibyte streams. * Tatsuo Ishii - * $PostgreSQL: pgsql/src/backend/utils/mb/wchar.c,v 1.47.2.2 2006/05/21 20:05:48 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/utils/mb/wchar.c,v 1.47.2.3 2006/08/22 03:38:13 momjian Exp $ * * WIN1250 client encoding updated by Pavel Behal * @@ -1325,7 +1325,10 @@ report_invalid_encoding(int encoding, const char *mbstr, int len) (errcode(ERRCODE_CHARACTER_NOT_IN_REPERTOIRE), errmsg("invalid byte sequence for encoding \"%s\": 0x%s", pg_enc2name_tbl[encoding].name, - buf))); + buf), + errhint("This failure can also happen if the byte sequence does not " + "match the encoding expected by the server, which is controlled " + "by \"client_encoding\"."))); } /* |