Thursday, December 14, 2017

DELPHI - How get default decimal separator

var
  DefaultLCID: LCID;
  sDefaultDecimalSeparator : string;
begin
  ...
  { read default decimal separator }
  DefaultLCID := GetThreadLocale;
  try
    sDefaultDecimalSeparator := trim( GetLocaleChar( DefaultLCID, LOCALE_SDECIMAL, '.' ) );
  except
    sDefaultDecimalSeparator := '.';
  end;

No comments:

Post a Comment