unixkvmbase.pp 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. {
  2. This file is part of the Free Pascal run time library.
  3. Copyright (c) 1999-2000 by Florian Klaempfl
  4. member of the Free Pascal development team
  5. Miscellaneous routines used by the Keyboard, Mouse and
  6. Video units on Unix-like operating systems.
  7. See the file COPYING.FPC, included in this distribution,
  8. for details about the copyright.
  9. This program is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  12. **********************************************************************}
  13. unit UnixKvmBase;
  14. {*****************************************************************************}
  15. interface
  16. {*****************************************************************************}
  17. function UTF8Enabled: Boolean;
  18. {*****************************************************************************}
  19. implementation
  20. {*****************************************************************************}
  21. uses
  22. baseunix;
  23. function UTF8Enabled: Boolean;
  24. var
  25. lang:string;
  26. begin
  27. {$ifdef BEOS}
  28. UTF8Enabled := true;
  29. exit;
  30. {$endif}
  31. lang:=upcase(fpgetenv('LANG'));
  32. UTF8Enabled := (Pos('.UTF-8', lang) > 0) or (Pos('.UTF8', lang) > 0);
  33. end;
  34. end.