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

Commit6f843e8

Browse files
committed
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)
1 parenta39c6ab commit6f843e8

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

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

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* conversion functions between pg_wchar and multi-byte streams.
33
* Tatsuo Ishii
4-
* $Id: wchar.c,v 1.9 1999/07/11 22:47:20 ishii Exp $
4+
* $Id: wchar.c,v 1.10 2000/01/25 02:12:27 ishii Exp $
55
*
66
* WIN1250 client encoding updated by Pavel Behal
77
*
@@ -166,11 +166,7 @@ pg_euccn_mblen(const unsigned char *s)
166166
{
167167
intlen;
168168

169-
if (*s==SS2)
170-
len=3;
171-
elseif (*s==SS3)
172-
len=3;
173-
elseif (*s&0x80)
169+
if (*s&0x80)
174170
len=2;
175171
else
176172
len=1;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp