<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">(and now to the list as well)<div><br></div><div>Hi Zabrane,<br><br>Check <a href="https://github.com/zotonic/zotonic/blob/master/src/support/z_string.erl">https://github.com/zotonic/zotonic/blob/master/src/support/z_string.erl</a><br>Function: sanitize_utf8/1<br><br>- Marc<br><div><div><br></div><div><br></div><div><br></div><div>On 30 aug. 2012, at 10:11, Zabrane Mickael wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>Hi guys,<br><br>I'm looking after a code which can tell if a binary() is UTF-8 valid or not:<br><br>is_utf8_valid(Bin) when is_binary(Bin) -> true;<br>is_utf8_valid(Bin) when is_binary(Bin) -> {false, Reason}.<br><br>Something to share?<br><br>Regards,<br>Zabrane<br><br>_______________________________________________<br>erlang-questions mailing list<br><a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>http://erlang.org/mailman/listinfo/erlang-questions<br></div></blockquote></div><br></div></body></html>