aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTatsuo Ishii <ishii@postgresql.org>2000-01-25 02:12:27 +0000
committerTatsuo Ishii <ishii@postgresql.org>2000-01-25 02:12:27 +0000
commit6f843e8dd8e25af9e8839c96c8bb0ee019fcd580 (patch)
tree359c2bb73e27b4445cb12e9ca9c56516ab1309c8 /src
parenta39c6ab4cbdb53eec5296dcb0c8cbb88b2ead005 (diff)
downloadpostgresql-6f843e8dd8e25af9e8839c96c8bb0ee019fcd580.tar.gz
postgresql-6f843e8dd8e25af9e8839c96c8bb0ee019fcd580.zip
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)
Diffstat (limited to 'src')
-rw-r--r--src/backend/utils/mb/wchar.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/backend/utils/mb/wchar.c b/src/backend/utils/mb/wchar.c
index 0e95b1914b4..e1a665ca847 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 multi-byte streams.
* 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
*
@@ -166,11 +166,7 @@ pg_euccn_mblen(const unsigned char *s)
{
int len;
- if (*s == SS2)
- len = 3;
- else if (*s == SS3)
- len = 3;
- else if (*s & 0x80)
+ if (*s & 0x80)
len = 2;
else
len = 1;