Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commite11cab6

Browse files
committed
Add hint for "invalid byte sequence for encoding" error message,
suggesting review of client_encoding.
1 parentdaebd52 commite11cab6

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

‎src/backend/utils/mb/wchar.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* conversion functions between pg_wchar and multibyte streams.
33
* Tatsuo Ishii
4-
* $PostgreSQL: pgsql/src/backend/utils/mb/wchar.c,v 1.55 2006/05/21 20:05:19 tgl Exp $
4+
* $PostgreSQL: pgsql/src/backend/utils/mb/wchar.c,v 1.56 2006/08/22 03:30:20 momjian Exp $
55
*
66
* WIN1250 client encoding updated by Pavel Behal
77
*
@@ -1486,7 +1486,10 @@ report_invalid_encoding(int encoding, const char *mbstr, int len)
14861486
(errcode(ERRCODE_CHARACTER_NOT_IN_REPERTOIRE),
14871487
errmsg("invalid byte sequence for encoding \"%s\": 0x%s",
14881488
pg_enc2name_tbl[encoding].name,
1489-
buf)));
1489+
buf),
1490+
errhint("This failure can also happen if the byte sequence does not "
1491+
"match the encoding expected by the server, which is controlled "
1492+
"by \"client_encoding\".")));
14901493
}
14911494

14921495
/*

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp