Add UTF-8 / UTF-32 conversion routines

These are intended to replace non-UTF-16 uses of mbstowcs() / wcstombs()
This commit is contained in:
matt335672
2023-09-19 09:19:17 +01:00
parent da8fa059cd
commit 0463e552dc
12 changed files with 1308 additions and 7 deletions
+11
View File
@@ -46,6 +46,17 @@ typedef unsigned long uintptr_t;
typedef int bool_t;
// Define Unicode character types
#if defined(HAVE_UCHAR_H)
#include <uchar.h>
#elif defined(HAVE_STDINT_H)
typedef uint_least16_t char16_t;
typedef uint_least32_t char32_t;
#else
typedef uint16_t char16_t;
typedef uint32_t char32_t;
#endif
/* you can define L_ENDIAN or B_ENDIAN and NEED_ALIGN or NO_NEED_ALIGN
in the makefile to override */