[erlang-questions] Validate UTF-8 binary

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


;-)

Regards,
Zabrane

On Aug 30, 2012, at 10:21 AM, Bengt Kleberg wrote:

> Greetings,
> 
> No code, just the comment that is_*() functions should return
> true/false. Not {}. Drop is_ from the name and you are fine.
> 
> 
> bengt
> 
> On Thu, 2012-08-30 at 10:11 +0200, Zabrane Mickael wrote:
>> 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
>> 
>> _______________________________________________
>> erlang-questions mailing list
>> erlang-questions@REDACTED
>> http://erlang.org/mailman/listinfo/erlang-questions
> 
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions





More information about the erlang-questions mailing list