psqlodbc multibyte.c setlocale(LC_CTYPE, 0) make process unable to use cregex to process chineses.

From: Ketop <626640485(at)qq(dot)com>
To: pgsql-odbc <pgsql-odbc(at)postgresql(dot)org>
Subject: psqlodbc multibyte.c setlocale(LC_CTYPE, 0) make process unable to use cregex to process chineses.
Date: 2023-07-11 05:29:37
Message-ID: tencent_A514FB72932C5A65AB315DFA66F06D20140A@qq.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-odbc

Dear Maintainers,
&nbsp; &nbsp; &nbsp;I found a bug after upgrade psqlodbc-10.0.1 to 13.02.

a regex for filtering chinese input don`t work any more. It cause our process coredump.&nbsp;

&nbsp; &nbsp; &nbsp;By lookinng up the old mailling list, i found there had a change,
-&nbsp; setlocale(LC_ALL, "")
+ setlocale(LC_CTYPE, "").

This change change process' LC_CTYPE to en_US.UTF-8 while LC_COLLATE remain default 'C'.&nbsp;

https://www.postgresql.org/message-id/CADc-R5gZ6feQCzh%2BBKy6KXO-ymx3Y1APY2x%3Dw%2BbL8Fk2CdaOeQ%40mail.gmail.com

Please reconsider that patch is necessary again.

Browse pgsql-odbc by date

  From Date Subject
Next Message Karl Aschbacher 2023-07-11 09:35:14 Change a query in the odbc driver
Previous Message Karl Aschbacher 2023-07-04 09:09:24 Change the name of a function in the odbc-driver