Unicode from Other ILE Languages
The Unicode functions are easily accessible in the C and C++ languages if you include the appropriate header files and use the appropriate LOCALETYPE option on the C or C++ compilation command. The Unicode functions are accessible from other ILE languages, such as RPG, COBOL, and CL, although no header files are provided for these languages.
_UCS2_ or _C_UCS2_ added
to the standard function name. The Unicode function has the same parameters
as the standard (non-Unicode) function.
_C_UCS2_btowc_C_UCS2_fgetwc_C_UCS2_fgetws_C_UCS2_fprintf_C_UCS2_fputwc_C_UCS2_fputws_C_UCS2_fscanf_C_UCS2_fwprintf_C_UCS2_fwscanf_C_UCS2_getwc_C_UCS2_getwchar_C_UCS2_iswalnum_C_UCS2_iswalpha_C_UCS2_iswblank_C_UCS2_iswcntrl_C_UCS2_iswctype_C_UCS2_iswdigit_C_UCS2_iswgraph_C_UCS2_iswlower_C_UCS2_iswprint |
_C_UCS2_iswpunct_C_UCS2_iswspace_C_UCS2_iswupper_C_UCS2_iswxdigit_C_UCS2_mblen_C_UCS2_mbrlen_C_UCS2_mbrtowc_C_UCS2_mbsinit_C_UCS2_mbsrtowcs_C_UCS2_printf_C_UCS2_putwc_C_UCS2_putwchar_C_UCS2_scanf_C_UCS2_snprintf_C_UCS2_sprintf_C_UCS2_sscanf_C_UCS2_swprintf_C_UCS2_swscanf_C_UCS2_towlower_C_UCS2_towupper |
_C_UCS2_ungetwc_C_UCS2_vfprintf_C_UCS2_vfscanf_C_UCS2_vfwprintf_C_UCS2_vfwscanf_C_UCS2_vprintf_C_UCS2_vscanf_C_UCS2_vsnprintf_C_UCS2_vsprintf_C_UCS2_vsscanf_C_UCS2_vswprintf_C_UCS2_vswscanf_C_UCS2_vwprintf_C_UCS2_vwscanf_C_UCS2_wcsftime_C_UCS2_wcsicmp_C_UCS2_wcslocaleconv_C_UCS2_wcsnicmp_C_UCS2_wcsrtombs_C_UCS2_wcstod32 |
_C_UCS2_wcstod64_C_UCS2_wcstod128_C_UCS2_wcstof_C_UCS2_wcstold_C_UCS2_wctob_C_UCS2_wprintf_C_UCS2_wscanf_UCS2_mbstowcs_UCS2_mbtowc_UCS2_setlocale_UCS2_wcrtomb_UCS2_wcstod_UCS2_wcstol_UCS2_wcstoll_UCS2_wcstombs_UCS2_wcstoul_UCS2_wcstoull_UCS2_wcswidth_UCS2_wctomb_UCS2_wcwidth |
When you use the LOCALETYPE(*LOCALEUCS2) option with either the
C or C++ compiler, the default UCS-2 locale is loaded when the program
starts. When you use any of the Unicode functions in the preceding
table from a different language, a call to _UCS2_setlocale(LC_ALL,
"") should be added when the application starts to ensure that the
default UCS2 locale is loaded.
The following table shows the functions added for CCSID neutral
and UTF-8 support. The functions have a prefix of _C_NEU_DM_ (for
data management I/O functions), _C_NEU_IFS_ or _C_UTF_IFS (for
IFS I/O functions), or _C_NEU_ or _C_UTF_ added
to the standard function name. The Unicode function has the same parameters
as the standard (non-Unicode) function.
UTF in
the prefix. Functions that do not operate on wide characters have NEU in
the prefix.
_C_NEU_asctime_C_NEU_asctime_r_C_NEU_atof_C_NEU_atoi_C_NEU_catopen_C_NEU_ctime_C_NEU_ctime_r_C_NEU_ctime64_C_NEU_ctime64_r_C_NEU_DM_clearerr_C_NEU_DM_feof_C_NEU_DM_ferror_C_NEU_DM_fflush_C_NEU_DM_fgetc_C_NEU_DM_fgetpos_C_NEU_DM_fgets_C_NEU_DM_fopen_C_NEU_DM_fprintf_C_NEU_DM_fputc_C_NEU_DM_fputs_C_NEU_DM_fread_C_NEU_DM_freopen_C_NEU_DM_fscanf_C_NEU_DM_fseek_C_NEU_DM_fsetpos_C_NEU_DM_ftell_C_NEU_DM_fwrite_C_NEU_DM_getc_C_NEU_DM_getchar_C_NEU_DM_gets_C_NEU_DM_perror_C_NEU_DM_printf_C_NEU_DM_putc_C_NEU_DM_putchar_C_NEU_DM_puts_C_NEU_DM_remove_C_NEU_DM_rename_C_NEU_DM_rewind_C_NEU_DM_ropen_C_NEU_DM_scanf_C_NEU_DM_setbuf_C_NEU_DM_setvbuf_C_NEU_DM_tmpfile_C_NEU_DM_tmpnam_C_NEU_DM_ungetc_C_NEU_DM_vfprintf_C_NEU_DM_vfscanf_C_NEU_DM_vprintf_C_NEU_DM_vscanf_C_NEU_gcvt_C_NEU_gmtime_C_NEU_gmtime_r_C_NEU_IFS_clearerr_C_NEU_IFS_fdopen_C_NEU_IFS_feof_C_NEU_IFS_ferror_C_NEU_IFS_fflush_C_NEU_IFS_fgetc |
_C_NEU_IFS_fgetpos_C_NEU_IFS_fgetpos64_C_NEU_IFS_fgets_C_NEU_IFS_fopen_C_NEU_IFS_fopen64_C_NEU_IFS_fprintf_C_NEU_IFS_fputc_C_NEU_IFS_fputs_C_NEU_IFS_fread_C_NEU_IFS_freopen_C_NEU_IFS_freopen64_C_NEU_IFS_fscanf_C_NEU_IFS_fseek_C_NEU_IFS_fseeko_C_NEU_IFS_fseeko64_C_NEU_IFS_fsetpos_C_NEU_IFS_fsetpos64_C_NEU_IFS_ftell_C_NEU_IFS_ftello_C_NEU_IFS_ftello64_C_NEU_IFS_fwrite_C_NEU_IFS_getc_C_NEU_IFS_getchar_C_NEU_IFS_gets_C_NEU_IFS_perror_C_NEU_IFS_printf_C_NEU_IFS_putc_C_NEU_IFS_putchar_C_NEU_IFS_puts_C_NEU_IFS_remove_C_NEU_IFS_rename_keep_C_NEU_IFS_rename_unlink_C_NEU_IFS_rewind_C_NEU_IFS_scanf_C_NEU_IFS_setbuf_C_NEU_IFS_setvbuf_C_NEU_IFS_tmpfile_C_NEU_IFS_tmpfile64_C_NEU_IFS_tmpnam_C_NEU_IFS_ungetc_C_NEU_IFS_vfprintf_C_NEU_IFS_vfscanf_C_NEU_IFS_vprintf_C_NEU_IFS_vscanf_C_NEU_isalnum_C_NEU_isalpha_C_NEU_isblank_C_NEU_iscntrl_C_NEU_isdigit_C_NEU_isgraph_C_NEU_islower_C_NEU_isprint_C_NEU_ispunct_C_NEU_isspace_C_NEU_isupper_C_NEU_isxdigit_C_NEU_itoa_C_NEU_localeconv |
_C_NEU_localtime_C_NEU_localtime_r_C_NEU_localtime64_C_NEU_localtime64_r_C_NEU_ltoa_C_NEU_memicmp_C_NEU_mktime_C_NEU_mktime64_C_NEU_nl_langinfo_C_NEU_snprintf_C_NEU_sprintf_C_NEU_sscanf_C_NEU_strcasecmp_C_NEU_strchr_C_NEU_strcspn_C_NEU_strerror_C_NEU_strfmon_C_NEU_strftime_C_NEU_strncasecmp_C_NEU_strpbrk_C_NEU_strptime_C_NEU_strrchr_C_NEU_strspn_C_NEU_strtod_C_NEU_strtod32_C_NEU_strtod64_C_NEU_strtod128_C_NEU_strtof_C_NEU_strtok_C_NEU_strtok_r_C_NEU_strtol_C_NEU_strtold_C_NEU_strtoll_C_NEU_strtoul_C_NEU_strtoull_C_NEU_system_C_NEU_toascii_C_NEU_tolower_C_NEU_toupper_C_NEU_ultoa_C_NEU_vsnprintf_C_NEU_vsprintf_C_NEU_vsscanf_C_NEU_wctrans_C_NEU_wctype_C_UTF_btowc_C_UTF_IFS_fgetwc_C_UTF_IFS_fgetws_C_UTF_IFS_fputwc_C_UTF_IFS_fputws_C_UTF_IFS_fwprintf_C_UTF_IFS_fwscanf_C_UTF_IFS_getwc_C_UTF_IFS_getwchar_C_UTF_IFS_putwc_C_UTF_IFS_putwchar_C_UTF_IFS_ungetwc_C_UTF_IFS_vfwprintf |
_C_UTF_IFS_vfwscanf_C_UTF_IFS_vwprintf_C_UTF_IFS_vwscanf_C_UTF_IFS_wfopen_C_UTF_IFS_wfopen64_C_UTF_IFS_wprintf_C_UTF_IFS_wscanf_C_UTF_isalnum_C_UTF_isalpha_C_UTF_isascii_C_UTF_isblank_C_UTF_iscntrl_C_UTF_isdigit_C_UTF_isgraph_C_UTF_islower_C_UTF_isprint_C_UTF_ispunct_C_UTF_isspace_C_UTF_isupper_C_UTF_iswalnum_C_UTF_iswalpha_C_UTF_iswblank_C_UTF_iswcntrl_C_UTF_iswctype_C_UTF_iswdigit_C_UTF_iswgraph_C_UTF_iswlower_C_UTF_iswprint_C_UTF_iswpunct_C_UTF_iswspace_C_UTF_iswupper_C_UTF_iswxdigit_C_UTF_isxdigit_C_UTF_mblen |
_C_UTF_mbrlen_C_UTF_mbrtowc_C_UTF_mbsinit_C_UTF_mbsrtowcs_C_UTF_mbstowcs_C_UTF_mbtowc_C_UTF_regcomp_C_UTF_regerror_C_UTF_regexec_C_UTF_setlocale_C_UTF_strcoll_C_UTF_strxfrm_C_UTF_swprintf_C_UTF_swscanf_C_UTF_toascii_C_UTF_tolower_C_UTF_toupper_C_UTF_towctrans_C_UTF_towlower_C_UTF_towupper_C_UTF_vswprintf_C_UTF_vswscanf_C_UTF_wcrtomb_C_UTF_wcscat_C_UTF_wcschr_C_UTF_wcscmp_C_UTF_wcscoll_C_UTF_wcscpy_C_UTF_wcscspn_C_UTF_wcsfmon_C_UTF_wcsftime_C_UTF_wcsicmp_C_UTF_wcslen_C_UTF_wcslocaleconv |
_C_UTF_wcsncat_C_UTF_wcsncmp_C_UTF_wcsncpy_C_UTF_wcsnicmp_C_UTF_WCS_nl_langinfo_C_UTF_wcspbrk_C_UTF_wcsptime_C_UTF_wcsrchr_C_UTF_wcsrtombs_C_UTF_wcsspn_C_UTF_wcsstr_C_UTF_wcstod_C_UTF_wcstod32_C_UTF_wcstod64_C_UTF_wcstod128_C_UTF_wcstof_C_UTF_wcstok_C_UTF_wcstol_C_UTF_wcstold_C_UTF_wcstoll_C_UTF_wcstombs_C_UTF_wcstoul_C_UTF_wcstoull_C_UTF_wcswcs_C_UTF_wcswidth_C_UTF_wcsxfrm_C_UTF_wctob_C_UTF_wctomb_C_UTF_wcwidth_C_UTF_wmemchr_C_UTF_wmemcmp_C_UTF_wmemcpy_C_UTF_wmemmove_C_UTF_wmemset |
When you use the LOCALETYPE(*LOCALEUTF) option with either the
C or C++ compiler, the default UTF locale is loaded at program startup
time. If you use any of the Unicode functions in the preceding table
from a different language, a call to _C_UTF_setlocale(LC_ALL,
"") should be added when the application starts to ensure that the
default UTF locale is loaded.