5 static char *
hToUTF8(
const char *src, ssize_t chars,
char *dst, ssize_t *bytes )
11 dst = malloc( chars * 2 );
24 static char *
hToUTF16(
const char *src, ssize_t chars,
char *dst, ssize_t *bytes )
30 *bytes = chars *
sizeof(
UTF_16 );
36 dst = malloc( chars *
sizeof(
UTF_16 ) );
45 *p++ = (
unsigned char)*src++;
52 static char *
hToUTF32(
const char *src, ssize_t chars,
char *dst, ssize_t *bytes )
58 *bytes = chars *
sizeof(
UTF_32 );
64 dst = malloc( chars *
sizeof(
UTF_32 ) );
73 *p++ = (
unsigned char)*src++;
92 return hToUTF8( src, chars, dst, bytes );
95 return hToUTF16( src, chars, dst, bytes );
98 return hToUTF32( src, chars, dst, bytes );