Re: UTF-8 collation on Windows? - Mailing list pgsql-general

From Daniel Verite
Subject Re: UTF-8 collation on Windows?
Date
Msg-id c1c35ef6-6d75-4124-836d-5e308202dff5@mm
Whole thread Raw
In response to Re: UTF-8 collation on Windows?  (Dev Kumkar <devdas.kumkar@gmail.com>)
Responses Re: UTF-8 collation on Windows?
List pgsql-general
    Dev Kumkar wrote:

> Succeeds but as replied earlier it creates database with LC_COLLATE =
> 'English_United States.1252' which corresponds to Latin1.

Despite windows-1252 being a monobyte encoding sharing most
of LATIN1 codes and character set, it does not mean that
English_United States.1252 is limited to this character set.
You may use UTF-8 databases with that locale.

Consider the 2nd paragraph of  "Character Set Support"
in the doc:
http://www.postgresql.org/docs/current/static/multibyte.html

    "For C or POSIX locale, any character set is allowed, but for other
     locales there is only one character set that will work
     correctly. (On Windows, however, UTF-8 encoding can be used with
     any locale.)"

This is a key difference with Unix when choosing a locale.

As for getting the exact same sort order than Linux, it's not possible but
that's not a Windows-vs-Unix issue. If you used FreeBSD or MacOS X, some
en_US.UTF-8 collation rules  would differ from Linux's libc too, resulting in
a different sort order for certain strings.

Best regards,
--
Daniel
PostgreSQL-powered mail user agent and storage: http://www.manitou-mail.org


pgsql-general by date:

Previous
From: Vik Fearing
Date:
Subject: Re: Query
Next
From: Tim Kane
Date:
Subject: Re: Possible to improve optimisation / index usage based on domain properties of a function