Commit 6f843e8d authored by Tatsuo Ishii's avatar Tatsuo Ishii

Fix pg_euccn_mblen() so that it always returns 2 if data is not ascii.

(EUC_CN does have only code set 0 and 1)
parent a39c6ab4
/* /*
* conversion functions between pg_wchar and multi-byte streams. * conversion functions between pg_wchar and multi-byte streams.
* Tatsuo Ishii * Tatsuo Ishii
* $Id: wchar.c,v 1.9 1999/07/11 22:47:20 ishii Exp $ * $Id: wchar.c,v 1.10 2000/01/25 02:12:27 ishii Exp $
* *
* WIN1250 client encoding updated by Pavel Behal * WIN1250 client encoding updated by Pavel Behal
* *
...@@ -166,11 +166,7 @@ pg_euccn_mblen(const unsigned char *s) ...@@ -166,11 +166,7 @@ pg_euccn_mblen(const unsigned char *s)
{ {
int len; int len;
if (*s == SS2) if (*s & 0x80)
len = 3;
else if (*s == SS3)
len = 3;
else if (*s & 0x80)
len = 2; len = 2;
else else
len = 1; len = 1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment