diff options
author | Tatsuo Ishii <ishii@postgresql.org> | 2003-04-12 08:01:23 +0000 |
---|---|---|
committer | Tatsuo Ishii <ishii@postgresql.org> | 2003-04-12 08:01:23 +0000 |
commit | 5d6b0a43dc7f78e5e240555769b02863e1bfc4da (patch) | |
tree | e217890210f418163e9bfbeb42badadc721b85f9 /src | |
parent | 8d477bd33a6e1a49f1c72c09a5c4afd317e2b79d (diff) | |
download | postgresql-5d6b0a43dc7f78e5e240555769b02863e1bfc4da.tar.gz postgresql-5d6b0a43dc7f78e5e240555769b02863e1bfc4da.zip |
Fix encoding conversion function bug.
See following posting for more details.
Subject: Re: [HACKERS] [BUGS] Bug #943: Server-Encoding from EUC_TW to UTF-8 doesn't
From: Tatsuo Ishii <t-ishii@sra.co.jp>
To: michael.enke@wincor-nixdorf.com, pgsql-bugs@postgresql.org
Cc: pgsql-hackers@postgresql.org
Date: Sat, 12 Apr 2003 10:51:45 +0900 (JST)
Diffstat (limited to 'src')
-rw-r--r-- | src/backend/utils/mb/conv.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/backend/utils/mb/conv.c b/src/backend/utils/mb/conv.c index a41f9abe9dd..35e9851989f 100644 --- a/src/backend/utils/mb/conv.c +++ b/src/backend/utils/mb/conv.c @@ -6,7 +6,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/mb/conv.c,v 1.43 2002/09/04 20:31:31 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/mb/conv.c,v 1.43.2.1 2003/04/12 08:01:23 ishii Exp $ * *------------------------------------------------------------------------- */ @@ -313,7 +313,7 @@ compare1(const void *p1, const void *p2) v1 = *(unsigned int *) p1; v2 = ((pg_utf_to_local *) p2)->utf; - return (v1 - v2); + return (v1 > v2)?1:((v1 == v2)?0:-1); } /* @@ -328,7 +328,7 @@ compare2(const void *p1, const void *p2) v1 = *(unsigned int *) p1; v2 = ((pg_local_to_utf *) p2)->code; - return (v1 - v2); + return (v1 > v2)?1:((v1 == v2)?0:-1); } /* |