title: Floating point numbers - Decimal Separator
body: <p>I am trying to write to an xml file but I am having difficulties handling Floating point numbers as they are using a comma(,) as decimal separator even though my regional settings are set to be a dot(.) for a decimal separator. I am having this problem in Windows Server 2012, but in Windows XP I am not experiencing this.</p>
  
  <pre><code> GetLocaleFormatSettings(GetThreadLocale, LocalFormatSettings);
     LocalFormatSettings.DecimalSeparator := '.';
  
     SHElem := xml.Root.Items.Add('SalesHeader');
     with SHElem do begin
      Items.Add('STORENUMBER', ssCurrentStoreNumber);
        case VarType(Dataset.FieldByName('Amounts').asFloat) of
        varCurrency : Items.Add('Amounts', FloatToStr(Dataset.FieldByName('Amount').asFloat,LocalFormatSettings));
        else          
        Items.Add('Fields', Dataset.FieldByName('Fields').AsString);
        end
     end;
  </code></pre>