Re: [PATCHES] Clear up strxfrm() in UTF-8 with locale on Windows

2007-05-06 Thread ITAGAKI Takahiro
Magnus Hagander [EMAIL PROTECTED] wrote: So actually an equality test against INT_MAX would be correct. But making that clear in the comment would probably not be a bad idea :-) I have applied a fix for this, because it obviously needed fixing regardless of if it fixes the original issue

Re: [PATCHES] Clear up strxfrm() in UTF-8 with locale on Windows

2007-05-06 Thread Magnus Hagander
So actually an equality test against INT_MAX would be correct. But making that clear in the comment would probably not be a bad idea :-) I have applied a fix for this, because it obviously needed fixing regardless of if it fixes the original issue all the way. Still looking for

Re: [PATCHES] Clear up strxfrm() in UTF-8 with locale on Windows

2007-05-05 Thread Magnus Hagander
Magnus Hagander wrote: On Wed, May 02, 2007 at 05:25:39PM -0400, Tom Lane wrote: Magnus Hagander [EMAIL PROTECTED] writes: Given this, perhaps the proper approach should instead be to just check the return value, and go from there? Should be a simple enough patch, something like the attached.

Re: [PATCHES] Clear up strxfrm() in UTF-8 with locale on Windows

2007-05-03 Thread Magnus Hagander
On Wed, May 02, 2007 at 05:25:39PM -0400, Tom Lane wrote: Magnus Hagander [EMAIL PROTECTED] writes: Given this, perhaps the proper approach should instead be to just check the return value, and go from there? Should be a simple enough patch, something like the attached. Tom, can you

Re: [PATCHES] Clear up strxfrm() in UTF-8 with locale on Windows

2007-05-02 Thread Magnus Hagander
ITAGAKI Takahiro wrote: The attached patch clears up the usage of strxfrm() on Windows. If the server encoding is UTF-8 and the locale is not C, we should use wcsxfrm() instead of strxfrm() because UTF-8 locale are not supported on Windows. We've already have a special version of strcoll() for

Re: [PATCHES] Clear up strxfrm() in UTF-8 with locale on Windows

2007-05-02 Thread Tom Lane
Magnus Hagander [EMAIL PROTECTED] writes: Given this, perhaps the proper approach should instead be to just check the return value, and go from there? Should be a simple enough patch, something like the attached. Tom, can you comment? Testing against INT_MAX seems like a type pun, or

[PATCHES] Clear up strxfrm() in UTF-8 with locale on Windows

2007-04-09 Thread ITAGAKI Takahiro
The attached patch clears up the usage of strxfrm() on Windows. If the server encoding is UTF-8 and the locale is not C, we should use wcsxfrm() instead of strxfrm() because UTF-8 locale are not supported on Windows. We've already have a special version of strcoll() for Windows, but the usage of

Re: [PATCHES] Clear up strxfrm() in UTF-8 with locale on Windows

2007-04-09 Thread Hiroshi Saito
From: ITAGAKI Takahiro [EMAIL PROTECTED] The attached patch clears up the usage of strxfrm() on Windows. If the server encoding is UTF-8 and the locale is not C, we should use wcsxfrm() instead of strxfrm() because UTF-8 locale are not supported on Windows. We've already have a special version

Re: [PATCHES] Clear up strxfrm() in UTF-8 with locale on Windows

2007-04-09 Thread Bruce Momjian
Your patch has been added to the PostgreSQL unapplied patches list at: http://momjian.postgresql.org/cgi-bin/pgpatches It will be applied as soon as one of the PostgreSQL committers reviews and approves it. ---