Re: locales and encodings on Windows

Lists: pgsql-hackers-win32
From: "Magnus Hagander" <mha(at)sollentuna(dot)net>
To: "Aleksander Kmetec" <aleksander(dot)kmetec(at)intera(dot)si>, <pgsql-hackers-win32(at)postgresql(dot)org>
Cc: "Bruce Momjian" <pgman(at)candle(dot)pha(dot)pa(dot)us>
Subject: Re: locales and encodings on Windows
Date: 2004-11-11 08:46:31
Message-ID: 6BCB9D8A16AC4241919521715F4D8BCE476111@algol.sollentuna.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers-win32

> Come on, people. This was the second time I reported this bug
> and also the second time nobody responded to my report. :-(

'fraid I know very little about this stuff, so I can't really comment on
the mani issue.. Was hoping someone else would pick it up...

> If it is indeed not possible to initdb with a utf8 (65001)
> locale, then this will cause a flood of bug reports once a
> large number of people start using PG on Windows. Can
> somebody try and confirm this problem?
> Simply try running initdb with a --locale value of
> german_germany.65001, spanish_spain.65001,
> french_france.65001 or any other locale you think should be
> supported by your system. You will need to do this from the
> command line, not from the installer. Does initdb accept this
> value or does it replace it with your current system locale?
>
> Unless somebody can come up with a solution, my suggestion
> for a work-around would be to remove unsupported encodings
> from the installer or at least warn users that their database
> will not be fully functional if they happen to choose one of
> the unsupported encodings.

Yeah, that sounds like what we'll have to do if nobody can fix this
completely. Do you know enough to say exactly which locale/encoding
combinations have to be removed fromt he installer?

Bruce - we probably need an open item on the backend side of this. If
not, then we need at least someone to say we can't fix this for 8.0.
Removing it from the installer is just a workaround...

> Last October there was a discussion on pgsql-hackers about
> writing locale support for PG, so it wouldn't depend on the
> system for locale functionality any more. Is anyone still
> working on that?

I have no idea, but I'm certain if someone is this is definitly not
going to happen for 8.0.

//Magnus


From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Magnus Hagander <mha(at)sollentuna(dot)net>
Cc: Aleksander Kmetec <aleksander(dot)kmetec(at)intera(dot)si>, pgsql-hackers-win32(at)postgresql(dot)org
Subject: Re: locales and encodings on Windows
Date: 2004-11-11 15:05:22
Message-ID: 200411111505.iABF5Me10995@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers-win32


Added to open items list:

o Disallow encodings like UTF8 which which PostgreSQL supports
but the operating system does not

---------------------------------------------------------------------------

Magnus Hagander wrote:
> > Come on, people. This was the second time I reported this bug
> > and also the second time nobody responded to my report. :-(
>
> 'fraid I know very little about this stuff, so I can't really comment on
> the mani issue.. Was hoping someone else would pick it up...
>
>
> > If it is indeed not possible to initdb with a utf8 (65001)
> > locale, then this will cause a flood of bug reports once a
> > large number of people start using PG on Windows. Can
> > somebody try and confirm this problem?
> > Simply try running initdb with a --locale value of
> > german_germany.65001, spanish_spain.65001,
> > french_france.65001 or any other locale you think should be
> > supported by your system. You will need to do this from the
> > command line, not from the installer. Does initdb accept this
> > value or does it replace it with your current system locale?
> >
> > Unless somebody can come up with a solution, my suggestion
> > for a work-around would be to remove unsupported encodings
> > from the installer or at least warn users that their database
> > will not be fully functional if they happen to choose one of
> > the unsupported encodings.
>
> Yeah, that sounds like what we'll have to do if nobody can fix this
> completely. Do you know enough to say exactly which locale/encoding
> combinations have to be removed fromt he installer?
>
> Bruce - we probably need an open item on the backend side of this. If
> not, then we need at least someone to say we can't fix this for 8.0.
> Removing it from the installer is just a workaround...
>
>
> > Last October there was a discussion on pgsql-hackers about
> > writing locale support for PG, so it wouldn't depend on the
> > system for locale functionality any more. Is anyone still
> > working on that?
>
> I have no idea, but I'm certain if someone is this is definitly not
> going to happen for 8.0.
>
> //Magnus
>

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073


From: Aleksander Kmetec <aleksander(dot)kmetec(at)intera(dot)si>
To: Magnus Hagander <mha(at)sollentuna(dot)net>
Cc: pgsql-hackers-win32(at)postgresql(dot)org, Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Subject: Re: locales and encodings on Windows
Date: 2004-11-11 20:05:27
Message-ID: 4193C607.1040102@intera.si
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers-win32

Magnus Hagander wrote:
> Do you know enough to say exactly which locale/encoding
> combinations have to be removed fromt he installer?

The encodings are:
UTF8
EUC_CN
EUC_TW
LATIN6 (ISO 8859-10/ECMA 144)
LATIN7 (ISO 8859-13)
LATIN8 (ISO 8859-14)
LATIN10 (ISO 8859-16/ASRO SR 14111

While you can still create databases using these encodings, it's not
possible to initb with a locale that uses the same encoding. This means
ORDER BY, UPPER() and similar will produce wrong results.

I guess I'll resubmit my installer patch for listing locales supported
by the system, this time without the encodings listed above. That way
most users won't see unsupported encodings, while people who know what
they're doing can still reach them by using CREATE DATABASE newdb
ENCODING 'encoding'.

>>Last October there was a discussion on pgsql-hackers about
>>writing locale support for PG, so it wouldn't depend on the
>>system for locale functionality any more. Is anyone still
>>working on that?
>
> I have no idea, but I'm certain if someone is this is definitly not
> going to happen for 8.0.

I know this feature can't make it into 8.0; but blaming Windows for more
than one release cycle might not look very good. :-(

Regards,
Aleksander


From: Thomas Kellerer <spam_eater(at)gmx(dot)net>
To: pgsql-hackers-win32(at)postgresql(dot)org
Subject: Re: locales and encodings on Windows
Date: 2004-12-22 12:12:16
Message-ID: cqbob1$6vb$1@sea.gmane.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers-win32

Aleksander Kmetec wrote on 11.11.2004 21:05:
>>
>> I have no idea, but I'm certain if someone is this is definitly not
>> going to happen for 8.0.
>
>
> I know this feature can't make it into 8.0; but blaming Windows for more
> than one release cycle might not look very good. :-(
>

I'm not really experienced with the whole locale/character set topic, but
what I'm wondering about (and I'm sure others will do as well) is, why
other databases (such as Firebird or Oracle) do support UTF8/Unicode on the
Windows platform but PostgreSQL does not.

Thomas