From f554af0a9fdbe0e9636fce36d6c809e81ce1539c Mon Sep 17 00:00:00 2001 From: "Marc G. Fournier" Date: Mon, 27 Apr 1998 17:10:50 +0000 Subject: From: t-ishii@sra.co.jp Hi, here are patches I promised (against 6.3.2): * character_length(), position(), substring() are now aware of multi-byte characters * add octet_length() * add --with-mb option to configure * new regression tests for EUC_KR (contributed by "Soonmyung. Hong" ) * add some test cases to the EUC_JP regression test * fix problem in regress/regress.sh in case of System V * fix toupper(), tolower() to handle 8bit chars note that: o patches for both configure.in and configure are included. maybe the one for configure is not necessary. o pg_proc.h was modified to add octet_length(). I used OIDs (1374-1379) for that. Please let me know if these numbers are not appropriate. --- src/backend/utils/adt/oracle_compat.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/backend/utils/adt/oracle_compat.c') diff --git a/src/backend/utils/adt/oracle_compat.c b/src/backend/utils/adt/oracle_compat.c index 3680b1e2194..3324108250a 100644 --- a/src/backend/utils/adt/oracle_compat.c +++ b/src/backend/utils/adt/oracle_compat.c @@ -1,7 +1,7 @@ /* * Edmund Mergl * - * $Id: oracle_compat.c,v 1.12 1998/02/26 04:37:19 momjian Exp $ + * $Id: oracle_compat.c,v 1.13 1998/04/27 17:08:19 scrappy Exp $ * */ @@ -55,7 +55,7 @@ lower(text *string) while (m--) { - *ptr_ret++ = tolower(*ptr++); + *ptr_ret++ = tolower((unsigned char)*ptr++); } return ret; @@ -95,7 +95,7 @@ upper(text *string) while (m--) { - *ptr_ret++ = toupper(*ptr++); + *ptr_ret++ = toupper((unsigned char)*ptr++); } return ret; @@ -135,18 +135,18 @@ initcap(text *string) ptr = VARDATA(string); ptr_ret = VARDATA(ret); - *ptr_ret++ = toupper(*ptr++); + *ptr_ret++ = toupper((unsigned char)*ptr++); --m; while (m--) { if (*(ptr_ret - 1) == ' ' || *(ptr_ret - 1) == ' ') { - *ptr_ret++ = toupper(*ptr++); + *ptr_ret++ = toupper((unsigned char)*ptr++); } else { - *ptr_ret++ = tolower(*ptr++); + *ptr_ret++ = tolower((unsigned char)*ptr++); } } -- cgit v1.2.3