lc-charset-dispatch.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /* Dispatching based on the current locale's character encoding.
  2. Copyright (C) 2018-2023 Free Software Foundation, Inc.
  3. This file is free software: you can redistribute it and/or modify
  4. it under the terms of the GNU Lesser General Public License as
  5. published by the Free Software Foundation; either version 2.1 of the
  6. License, or (at your option) any later version.
  7. This file is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. GNU Lesser General Public License for more details.
  11. You should have received a copy of the GNU Lesser General Public License
  12. along with this program. If not, see <https://www.gnu.org/licenses/>. */
  13. /* Written by Bruno Haible <bruno@clisp.org>, 2018. */
  14. #include <wchar.h>
  15. #if GNULIB_defined_mbstate_t
  16. /* A classification of special values of the encoding of the current locale. */
  17. typedef enum
  18. {
  19. enc_other, /* other */
  20. enc_utf8, /* UTF-8 */
  21. enc_eucjp, /* EUC-JP */
  22. enc_94, /* EUC-KR, GB2312, BIG5 */
  23. enc_euctw, /* EUC-TW */
  24. enc_gb18030, /* GB18030 */
  25. enc_sjis /* SJIS */
  26. }
  27. enc_t;
  28. /* Returns a classification of special values of the encoding of the current
  29. locale. */
  30. extern enc_t locale_encoding_classification (void);
  31. #endif