Commit 41839b7a authored by Peter Eisentraut's avatar Peter Eisentraut

Fix ICU collation use on Windows

Windows uses a separate code path for libc locales.  The code previously
ended up there also if an ICU collation should be used, leading to a
crash.
Reported-by: default avatarAshutosh Sharma <ashu.coek88@gmail.com>
parent 3ef97e72
...@@ -1433,7 +1433,8 @@ varstr_cmp(char *arg1, int len1, char *arg2, int len2, Oid collid) ...@@ -1433,7 +1433,8 @@ varstr_cmp(char *arg1, int len1, char *arg2, int len2, Oid collid)
#ifdef WIN32 #ifdef WIN32
/* Win32 does not have UTF-8, so we need to map to UTF-16 */ /* Win32 does not have UTF-8, so we need to map to UTF-16 */
if (GetDatabaseEncoding() == PG_UTF8) if (GetDatabaseEncoding() == PG_UTF8
&& (!mylocale || mylocale->provider == COLLPROVIDER_LIBC))
{ {
int a1len; int a1len;
int a2len; int a2len;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment