libs/web: fix sanitize_utf8(), passes all testcases now