Updated encode.c: convert_to_utf8 function

not free input buffer