Skip to content

Commit 7785d83

Browse files
authored
Ensure that decode/encode functions use the locale. (#38)
Ensure that decode/encode functions use the locale. On return, the locale is restored to the value it had before calling any function.
1 parent 8c56777 commit 7785d83

File tree

4 files changed

+249
-54
lines changed

4 files changed

+249
-54
lines changed

CMakeLists.txt

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,14 @@ include ( DefaultDirs )
6060
include ( CheckSTDC )
6161
include ( CheckIncludeFile )
6262
check_include_file ( string.h HAVE_STRING_H )
63-
check_include_file ( stdlib.h HAVE_STDLIB_H )
64-
check_include_file ( stdio.h HAVE_STDIO_H )
65-
check_include_file ( math.h HAVE_MATH_H )
66-
check_include_file ( errno.h HAVE_ERRNO_H )
67-
check_include_file ( stdarg.h HAVE_STDARG_H )
63+
check_include_file ( stdlib.h HAVE_STDLIB_H )
64+
check_include_file ( stdio.h HAVE_STDIO_H )
65+
check_include_file ( math.h HAVE_MATH_H )
66+
check_include_file ( errno.h HAVE_ERRNO_H )
67+
check_include_file ( stdarg.h HAVE_STDARG_H )
6868
check_include_file ( unistd.h HAVE_UNISTD_H )
69+
check_include_file ( locale.h HAVE_LOCALE_H )
70+
check_include_file ( xlocale.h HAVE_XLOCALE_H )
6971

7072
if ( WIN32 )
7173
# Check presence of MS include files

config.h.cmake

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@
1313
/* Define to 1 if you have the <math.h> header file. */
1414
#cmakedefine HAVE_MATH_H @HAVE_MATH_H@
1515

16+
/* Define to 1 if you have the <locale.h> header file. */
17+
#cmakedefine HAVE_LOCALE_H @HAVE_LOCALE_H@
18+
1619
/* Define to 1 if you have the <stdarg.h> header file. */
1720
#cmakedefine HAVE_STDARG_H @HAVE_STDARG_H@
1821

@@ -34,6 +37,9 @@
3437
/* Define to 1 if you have the <windows.h> header file. */
3538
#cmakedefine HAVE_WINDOWS_H @HAVE_WINDOWS_H@
3639

40+
/* Define to 1 if you have the <xlocale.h> header file. */
41+
#cmakedefine HAVE_XLOCALE_H @HAVE_XLOCALE_H@
42+
3743
/* Define if using the MinGW32 environment */
3844
#cmakedefine MINGW32 @MINGW32@
3945

0 commit comments

Comments
 (0)