[erlang-questions] Validate UTF-8 binary

Zabrane Mickael zabrane3@REDACTED
Thu Aug 30 10:11:47 CEST 2012


Hi guys,

I'm looking after a code which can tell if a binary() is UTF-8 valid or not:

is_utf8_valid(Bin) when is_binary(Bin) -> true;
is_utf8_valid(Bin) when is_binary(Bin) -> {false, Reason}.

Something to share?

Regards,
Zabrane




More information about the erlang-questions mailing list