[erlang-questions] Validate UTF-8 binary

Zabrane Mickael zabrane3@REDACTED
Thu Aug 30 10:25:52 CEST 2012


Thanks guys.
You saved my day.

Regards
Zab

On Aug 30, 2012, at 10:21 AM, Michael Uvarov wrote:

> is_unicode_valid(Str) ->
>    Bin = unicode:characters_to_binary(Str),
>    if is_binary(Bin) -> true;   true -> {false, Bin}  end.
> 
> Str can be binary or characters.
> 
> --
> Best regards,
> Uvarov Michael



More information about the erlang-questions mailing list