Re: Can we get rid of GetLocaleInfoEx() yet?

From: Juan José Santamaría Flecha <juanjo(dot)santamaria(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Can we get rid of GetLocaleInfoEx() yet?
Date: 2020-03-29 17:06:56
Message-ID: CAC+AXB3BZ7Q3z4FHXcGusuJ==+C4c-5=9dzayJytweEVRdciyw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, Mar 29, 2020 at 7:00 PM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

>
> In general, I think the problem is that we might be dealing with a
> Unix-style locale string, in which the encoding name might be quite
> a few other things besides "utf8". But actually your patch works
> for that too, since what's going to happen next is we'll search the
> encoding_match_list[] for a match. I do suggest being a bit more
> paranoid about what's a codepage number though, as attached.
> (Untested, since I lack a Windows environment, but it's pretty
> straightforward code.)
>

It works for the issue just fine, and more comments make a better a
patch, so no objections from me.

Regards,

Juan José Santamaría Flecha

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Justin Pryzby 2020-03-29 17:14:15 Re: pg11+: pg_ls_*dir LIMIT 1: temporary files .. not closed at end-of-transaction
Previous Message Tom Lane 2020-03-29 17:00:23 Re: Can we get rid of GetLocaleInfoEx() yet?