On Aug 19, 2010, at 3:24 PM, Tom Lane wrote:
> Steven Schlansker <steven(at)trumpet(dot)io> writes:
>> I'm not at all experienced with character encodings so I could
>> be totally off base, but isn't it wrong to ever call isspace(0x85),
>> whatever the result may be, given that the actual character is 0xCF85?
>> (U+03C5, GREEK SMALL LETTER UPSILON)
> We generally assume that in server-safe encodings, the ctype.h functions
> will behave sanely on any single-byte value. You can argue the wisdom
> of that, but deciding to change that policy would be a rather massive
> code change; I'm not excited about going that direction.
Fair enough. I presume there are no "server-safe encodings" for which
a multibyte sequence 0x XX20 would be valid - which would break anyway
(as the second byte looks like a real space)
> You need a setlocale() call, else the program acts as though it's in C
> locale regardless of environment.
Sigh. I hate C sometimes. :-p
Anyway, it looks like this is actually a BSD bug which got copy +
pasted into Apple's Darwin source -
I have a couple of contacts at Apple so I'll see if there's any interest in
backporting a fix, but I wouldn't hope for it to happen quickly if at all...
Thanks for taking a look into fixing this, I hope you guys can reach
consensus on how to get it fixed :)
In response to
pgsql-hackers by date
|Next:||From: Quan Zongliang||Date: 2010-08-19 23:01:54|
|Subject: Re: Fw: patch for pg_ctl.c to add windows service
|Previous:||From: Josh Berkus||Date: 2010-08-19 22:51:48|
|Subject: Avoiding deadlocks ...|
pgsql-bugs by date
|Next:||From: Tatsuo Ishii||Date: 2010-08-19 23:29:57|
|Subject: Re: COPY FROM/TO losing a single byte of a multibyte UTF-8
|Previous:||From: Thue Janus Kristensen||Date: 2010-08-19 22:46:52|
|Subject: Re: BUG #5622: Query failed: server closed the connection unexpectedly|