localcharset.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /* Determine a canonical name for the current locale's character encoding.
  2. Copyright (C) 2000-2003, 2009-2017 Free Software Foundation, Inc.
  3. This file is part of the GNU CHARSET Library.
  4. This program is free software; you can redistribute it and/or modify
  5. it under the terms of the GNU Lesser General Public License as published by
  6. the Free Software Foundation; either version 2, or (at your option)
  7. any later version.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. GNU Lesser General Public License for more details.
  12. You should have received a copy of the GNU Lesser General Public License along
  13. with this program; if not, see <http://www.gnu.org/licenses/>. */
  14. #ifndef _LOCALCHARSET_H
  15. #define _LOCALCHARSET_H
  16. #ifdef __cplusplus
  17. extern "C" {
  18. #endif
  19. /* Determine the current locale's character encoding, and canonicalize it
  20. into one of the canonical names listed in config.charset.
  21. The result must not be freed; it is statically allocated.
  22. If the canonical name cannot be determined, the result is a non-canonical
  23. name. */
  24. extern const char * locale_charset (void);
  25. /* Same as above, but only look at environment variables, avoiding calls to
  26. `setlocale', `nl_langinfo', etc. See
  27. <http://lists.gnu.org/archive/html/guile-devel/2011-11/msg00040.html> for
  28. the rationale. */
  29. extern const char * environ_locale_charset (void);
  30. #ifdef __cplusplus
  31. }
  32. #endif
  33. #endif /* _LOCALCHARSET_H */