add 'noError' to euc_tw_and_big5.c
Hi, Heikki
'noError' argument was added at commit ea1b99a661,
but it seems to be neglected in euc_tw_and_big5.c Line 289.
please see the attachment.
Regards,
Yukun Wang
Attachments:
add-noError.patchapplication/octet-stream; name=add-noError.patchDownload
diff --git a/src/backend/utils/mb/conversion_procs/euc_tw_and_big5/euc_tw_and_big5.c b/src/backend/utils/mb/conversion_procs/euc_tw_and_big5/euc_tw_and_big5.c
index 4bf8acda99..e9f1d61af8 100644
--- a/src/backend/utils/mb/conversion_procs/euc_tw_and_big5/euc_tw_and_big5.c
+++ b/src/backend/utils/mb/conversion_procs/euc_tw_and_big5/euc_tw_and_big5.c
@@ -286,8 +286,12 @@ big52euc_tw(const unsigned char *big5, unsigned char *p, int len, bool noError)
{
/* ASCII */
if (c1 == 0)
+ {
+ if (noError)
+ break;
report_invalid_encoding(PG_BIG5,
(const char *) big5, len);
+ }
*p++ = c1;
big5++;
len--;
On Wed, Jul 21, 2021 at 02:15:14AM +0000, wangyukun@fujitsu.com wrote:
'noError' argument was added at commit ea1b99a661,
but it seems to be neglected in euc_tw_and_big5.c Line 289.
please see the attachment.
That sounds right to me. Double-checking the area, I am not seeing
another portion of the code to fix.
--
Michael
On Tue, Jul 20, 2021 at 10:35 PM Michael Paquier <michael@paquier.xyz>
wrote:
On Wed, Jul 21, 2021 at 02:15:14AM +0000, wangyukun@fujitsu.com wrote:
'noError' argument was added at commit ea1b99a661,
but it seems to be neglected in euc_tw_and_big5.c Line 289.
please see the attachment.That sounds right to me. Double-checking the area, I am not seeing
another portion of the code to fix.
Agreed, will push.
--
John Naylor
EDB: http://www.enterprisedb.com
On Tue, Jul 20, 2021 at 10:35 PM Michael Paquier <michael@paquier.xyz>
wrote:
On Wed, Jul 21, 2021 at 02:15:14AM +0000, wangyukun@fujitsu.com wrote:
'noError' argument was added at commit ea1b99a661,
but it seems to be neglected in euc_tw_and_big5.c Line 289.
please see the attachment.That sounds right to me. Double-checking the area, I am not seeing
another portion of the code to fix.
Pushed, but I forgot to give you review credit, sorry about that. Thanks
for taking a look!
--
John Naylor
EDB: http://www.enterprisedb.com