Undated encode.c:  convert_to_utf8() modified

code to handle conversion errors and continue.