<!DOCTYPE html><html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body>
    <p>Hey Giuseppe,</p>
    <p>I think you are also the person that asked this stack overflow
      question? <a class="moz-txt-link-freetext" href="https://stackoverflow.com/q/78717017">https://stackoverflow.com/q/78717017</a></p>
    <p>If so, I think your has already been resolved?</p>
    <p>Jorn<br>
    </p>
    <div class="moz-cite-prefix">On 7-7-2024 12:45, Giuseppe Barbieri
      wrote:<br>
    </div>
    <blockquote type="cite" cite="mid:CAOTtYn5LkSTsrpxEFansRk8BXzOndhXmvdWkZ7z-jD-+CG3Xcg@mail.gmail.com">
      
      <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" moz-do-not-send="true">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();
<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>
    </blockquote>
  </body>
</html>