<div dir="ltr"><div><div><div>Hi folks,<br><br><br></div>I've been having some issue with the Locale<br><br></div>I've been playing with FFM in Jdk 22 to call native methods in <a href="https://github.com/mala-project/lammps/tree/mala">Laamps</a>, but long short story: <code>atof</code>  will parse <code>2.2598258677677969</code> as <code>2</code> because on my system <code>localeconv()->decimal_point</code> is indeed a comma<br><br></div>The curious thing is that if I try to:<br><div style="background-color:rgb(255,255,255);color:rgb(8,8,8)"><pre style="font-family:"JetBrains Mono",monospace;font-size:9.8pt"><span style="color:rgb(0,51,179)">auto </span><span style="color:rgb(0,0,0)">name </span>= <span style="color:rgb(0,128,128)">std</span>::<span style="color:rgb(0,128,128)">locale</span>::global(<span style="color:rgb(0,128,128)">std</span>::locale(<span style="color:rgb(6,125,23)">"en_DK.utf8"</span>)).name();<br><span style="color:rgb(0,128,128)">utils</span>::logmesg(<span style="color:rgb(0,0,0)">lmp</span>, <span style="color:rgb(6,125,23)">"old locale {}</span><span style="color:rgb(0,55,166)">\n</span><span style="color:rgb(6,125,23)">"</span>, <span style="color:rgb(0,0,0)">name</span>);</pre></div><div>I get <br><br>old locale C<br><br>which, if I understood it right, it's how it should be, but the text parsing fails nonetheless<br><br>unfortunately native code isn't my field, so I'm asking for help<br><br><br></div><div>Thanks in advance,<br></div><div>Giuseppe<code><br></code></div></div>