[fpc-pascal] SysLocale usage

Marco van de Voort marcov at stack.nl
Mon Feb 21 10:14:26 CET 2011


In our previous episode, michael.vancanneyt at wisa.be said:
> >
> > Looks totally windows specific to me. Probably that is the reason why
> > clocale doesn't since you'd need large "iso-code" to Lcid tables that
> > unnecessarily increase binary size.
> 
> Not necessarily. You could just emulate the windows constants. 

Yes, you could. But as said you need tables to emulate them.  And I doubt it
is worth it?

> As long as you don't rely on the actual numerical values, this is not a
> problem.

What is the use of this record then?

 TSysLocale = record
    { Delphi compat fields}
    DefaultLCID,
    PriLangID,
    SubLangID  : Integer;

    case byte of
      { win32 names }
      1 : (FarEast: boolean; MiddleEast: Boolean);
      { real meaning }
      2 : (MBCS : boolean; RightToLeft: Boolean);
  end;

That leaves the MBCS and RightToLeft, of which MBCS has no meaning on *nix
(since if that changes, a lot more has to change?)



More information about the fpc-pascal mailing list