Issue #57 wontfix
The following helpers would be nice to have:
ffi.encode_utf8(unicode_string) -> new_char*_cdata ffi.encode_utf8(unicode_string, target_char*_cdata, maximum_length) ffi.decode_utf8(char*_cdata, [length]) -> unicode_string
The idea is that UTF-8 is a bit special in that it is the most widely used encoding on new programs . The above gives a straight way to encode/decode without doing two copies of the data.