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