diff options
author | Tatsuo Ishii <ishii@postgresql.org> | 2005-12-24 12:08:10 +0000 |
---|---|---|
committer | Tatsuo Ishii <ishii@postgresql.org> | 2005-12-24 12:08:10 +0000 |
commit | 951f2bdd2398b0e9b10533c9d75fb219db0ef542 (patch) | |
tree | 9f672e4c42be6276a837ac8d86a29a8594e3e9f6 | |
parent | cd726e1cf83ccde2b2a8aa9d0a669e84ff84713f (diff) |
Fix long standing Asian multibyte charsets bug.
See:
Subject: [HACKERS] bugs with certain Asian multibyte charsets
From: Tatsuo Ishii <ishii@sraoss.co.jp>
To: pgsql-hackers@postgresql.org
Date: Sat, 24 Dec 2005 18:25:33 +0900 (JST)
for more details.
-rw-r--r-- | src/backend/utils/mb/wchar.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/backend/utils/mb/wchar.c b/src/backend/utils/mb/wchar.c index c72980e8e9a..ff78b30a91e 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 - * $Id: wchar.c,v 1.30.2.1 2003/01/11 06:59:30 ishii Exp $ + * $Id: wchar.c,v 1.30.2.2 2005/12/24 12:08:10 ishii Exp $ * * WIN1250 client encoding updated by Pavel Behal * @@ -70,7 +70,7 @@ static int pg_euc2wchar_with_len { from++; *to = *from++ << 8; - *to |= 0x3f & *from++; + *to |= 0x7f & *from++; len -= 3; } else if ((*from & 0x80) && len >= 2) @@ -150,7 +150,7 @@ static int pg_euccn2wchar_with_len if (*from == SS2 && len >= 3) { from++; - *to = 0x3f00 & (*from++ << 8); + *to = 0x7f00 & (*from++ << 8); *to = *from++; len -= 3; } @@ -158,7 +158,7 @@ static int pg_euccn2wchar_with_len { from++; *to = *from++ << 8; - *to |= 0x3f & *from++; + *to |= 0x7f & *from++; len -= 3; } else if ((*from & 0x80) && len >= 2) @@ -213,7 +213,7 @@ static int pg_euctw2wchar_with_len { from++; *to = *from++ << 8; - *to |= 0x3f & *from++; + *to |= 0x7f & *from++; len -= 3; } else if ((*from & 0x80) && len >= 2) |