1 #ifndef Py_INTERNAL_FILEUTILS_H
2 #define Py_INTERNAL_FILEUTILS_H
3 #ifdef __cplusplus
4 extern "C" {
5 #endif
6 
7 #ifndef Py_BUILD_CORE
8 #  error "Py_BUILD_CORE must be defined to include this header"
9 #endif
10 
11 #include <locale.h>   /* struct lconv */
12 
13 PyAPI_DATA(int) _Py_HasFileSystemDefaultEncodeErrors;
14 
15 PyAPI_FUNC(int) _Py_DecodeUTF8Ex(
16     const char *arg,
17     Py_ssize_t arglen,
18     wchar_t **wstr,
19     size_t *wlen,
20     const char **reason,
21     _Py_error_handler errors);
22 
23 PyAPI_FUNC(int) _Py_EncodeUTF8Ex(
24     const wchar_t *text,
25     char **str,
26     size_t *error_pos,
27     const char **reason,
28     int raw_malloc,
29     _Py_error_handler errors);
30 
31 PyAPI_FUNC(wchar_t*) _Py_DecodeUTF8_surrogateescape(
32     const char *arg,
33     Py_ssize_t arglen,
34     size_t *wlen);
35 
36 PyAPI_FUNC(int) _Py_GetForceASCII(void);
37 
38 /* Reset "force ASCII" mode (if it was initialized).
39 
40    This function should be called when Python changes the LC_CTYPE locale,
41    so the "force ASCII" mode can be detected again on the new locale
42    encoding. */
43 PyAPI_FUNC(void) _Py_ResetForceASCII(void);
44 
45 
46 PyAPI_FUNC(int) _Py_GetLocaleconvNumeric(
47     struct lconv *lc,
48     PyObject **decimal_point,
49     PyObject **thousands_sep);
50 
51 #ifdef __cplusplus
52 }
53 #endif
54 #endif /* !Py_INTERNAL_FILEUTILS_H */
55