exp2l: Work around a NetBSD 10.0/i386 bug.
[gnulib.git] / lib / lc-charset-unicode.h
blob9644e63fdbb602fb520e9560b135f165a8f726e9
1 /* Conversion between the current locale's character encoding and Unicode.
2 Copyright (C) 2023-2024 Free Software Foundation, Inc.
4 This file is free software: you can redistribute it and/or modify
5 it under the terms of the GNU Lesser General Public License as
6 published by the Free Software Foundation; either version 2.1 of the
7 License, or (at your option) any later version.
9 This file 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. See the
12 GNU Lesser General Public License for more details.
14 You should have received a copy of the GNU Lesser General Public License
15 along with this program. If not, see <https://www.gnu.org/licenses/>. */
17 /* Written by Bruno Haible <bruno@clisp.org>, 2023. */
19 /* This facility is only needed on specific platforms. */
20 #if GL_CHAR32_T_IS_UNICODE && GL_CHAR32_T_VS_WCHAR_T_NEEDS_CONVERSION
22 # include <wchar.h>
23 # include <uchar.h>
25 /* Returns WC (must be != 0) as a Unicode character,
26 or 0 in case it cannot be converted. */
27 extern char32_t locale_encoding_to_unicode (wchar_t wc);
29 /* Returns UC (must be != 0) as a wide character,
30 or 0 in case it cannot be converted. */
31 extern wchar_t unicode_to_locale_encoding (char32_t uc);
33 #endif