ODBC problem with decimal separator

From: Mauro Gatti <Mauro(dot)Gatti(at)pentanasolutions(dot)com>
To: "pgsql-odbc(at)lists(dot)postgresql(dot)org" <pgsql-odbc(at)lists(dot)postgresql(dot)org>
Subject: ODBC problem with decimal separator
Date: 2023-11-07 16:29:19
Message-ID: SY4P282MB4100D636EAD9190147DE26D69BA9A@SY4P282MB4100.AUSP282.PROD.OUTLOOK.COM
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-odbc

Hello,

we are upgrading psqlODBC from version 9 to 15 following the upgrade of the postgres database from version 11 to 15.

The application using psqlODBC is an old legacy application written in .NET Framework and we are facing a problem with the decimal separator.

The application is expecting the separator to be . (dot) and everything is working well, even if the OS locale have , (comma) as separator. The application then needs to open a browser to visualize a PDF file and from that moment on every numeric value returned from the ODBC driver will have comma as decimal separator which is misinterpreted from the application, showing mangled results.

My guess is that the Adobe library used to open the PDF is calling setlocale() to set the decimal separator equal to the OS locale (comma) and this is in turn propagated to the ODBC driver. Before the invocation, the decimal separator is undefined and set to the default locale (dot).

Does anyone know if there's a way to instruct the driver to not apply the locale setting or have experienced something similar?

Regards,

Mauro Gatti

.NET Developer

[https://i.imgur.com/5wrpArH.png]

+39 0 226950535

[https://i.imgur.com/yPFaGzr.png]

Mauro(dot)Gatti(at)pentanasolutions(dot)com <mailto:Mauro(dot)Gatti(at)pentanasolutions(dot)com>
[https://i.imgur.com/kBUNJAE.png]

www.esseitalia.it<https://www.esseitalia.it/en/home-2/>

[https://i.imgur.com/Bfr2vBy.png] <https://www.esseitalia.it/en/home-2/> [https://i.imgur.com/OZ1IEP1.png] <https://pentanasolutions.com/general/view/our-values>

[https://i.imgur.com/zbbA2rr.png] <https://www.youtube.com/channel/UC9undLWe6RcLflxHW-rAFWA>

[https://i.imgur.com/jT6psLE.png] <https://www.linkedin.com/company/pentana-solutions/>

<https://www.pentanasolutions.com/contact/>Contact Us<https://www.esseitalia.it/en/contatti-eng/>

Sede legale: Viale Andrea Doria, 7 - 20124 Milano (MI) - Italy

Sede Operativa: Via Giovanni Antonio Amadeo 59 - 20134 Milano - Italy

P.I. Milano, 09051640150 - C.C.I.A.A. 1266371

C.S. EUR 101.000,00 int. versato

Pentana Solutions accepts no liability for the content of this email, or for the consequences of any actions taken on the basis of the information provided, unless that information is subsequently confirmed in writing. If you are not the intended recipient, you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited. Esseitalia is a Pentana Solutions company.

Browse pgsql-odbc by date

  From Date Subject
Next Message Evan Cornell 2023-11-20 14:17:53 Re: [EXT] ODBC driver on Windows 11 ARM64
Previous Message Dave Cramer 2023-11-01 12:32:05 Re: ODBC driver on Windows 11 ARM64