Re: [HACKERS] lower and upper not UTF-8 safe

2003-08-05 Thread Tom Lane
Karel Zak <[EMAIL PROTECTED]> writes: > On Mon, Aug 04, 2003 at 05:03:02PM -0400, Tom Lane wrote: >> Only if you use a locale that is assuming a character set that is not >> UTF8 but does have characters with the high bit set. I'm not sure that >> we can do anything to defend against locale/charse

Re: [HACKERS] lower and upper not UTF-8 safe

2003-08-05 Thread Karel Zak
On Mon, Aug 04, 2003 at 05:03:02PM -0400, Tom Lane wrote: > Julian Satchell <[EMAIL PROTECTED]> writes: > > The implementations of lower and upper in > > src/backend/utils/adt/oracle_compat.c use the single byte macros from > > ctype.h to alter individual bytes in the text string. > > > If the te

Re: [HACKERS] lower and upper not UTF-8 safe

2003-08-04 Thread Tom Lane
Julian Satchell <[EMAIL PROTECTED]> writes: > The implementations of lower and upper in > src/backend/utils/adt/oracle_compat.c use the single byte macros from > ctype.h to alter individual bytes in the text string. > If the text is UTF-8 encoded this is totally wrong, and will result in > an inv

[HACKERS] lower and upper not UTF-8 safe

2003-08-04 Thread Julian Satchell
The implementations of lower and upper in src/backend/utils/adt/oracle_compat.c use the single byte macros from ctype.h to alter individual bytes in the text string. If the text is UTF-8 encoded this is totally wrong, and will result in an invalid string that is no longer UTF-8. The code is basi