lib/util/charset Fix and add public interface for convert_string_error_handle