Use wcstombs when iconv is not present (#223)

Replace the jerry-built UTF-16 => Latin-1 code path with a cross-platform wcstombs solution that emits UTF-8.

This adds an element to the end of the MdbHandle struct, but should not break any existing code.

A run-time option could be added later to emit other encodings, but people who care about such things can just use the iconv code path.
This commit is contained in:
Evan Miller
2020-12-20 17:56:33 -05:00
committed by GitHub
parent fb6637c503
commit a8414720e4
4 changed files with 47 additions and 11 deletions

View File

@@ -27,7 +27,7 @@ AC_PROG_YACC
dnl Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS(fcntl.h limits.h unistd.h)
AC_CHECK_HEADERS(fcntl.h limits.h unistd.h xlocale.h)
AC_CHECK_HEADERS(wordexp.h)
AC_CHECK_LIB(mswstr, DBLCMapStringW)
AC_CHECK_DECLS([program_invocation_short_name], [], [], [[
@@ -36,7 +36,7 @@ AC_CHECK_DECLS([program_invocation_short_name], [], [], [[
dnl Checks for library functions.
VL_LIB_READLINE
AC_CHECK_FUNCS(strptime fmemopen gmtime_r)
AC_CHECK_FUNCS(strptime fmemopen gmtime_r wcstombs_l)
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST