[erlang-questions] unicode + version < 17.0

José Valim jose.valim@REDACTED
Thu Apr 17 17:52:09 CEST 2014


Oops, talk about me going off-topic. :)

There is definitely an issue with the third case, which will be a binary
encoded in latin1 or utf-8 depending on the erlang version. The proposed
solution will work as long as users give the InEnc explicitly as I don't
believe there is a way to retrieve the encoding of the binary. I can't
think of any alternative.

I would also change the solution to fail on the second clause. I would
rather be explicit the user is passing data in the wrong encoding/format
than try to guess it (which may lead to bad guesses).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20140417/55b34dff/attachment.htm>


More information about the erlang-questions mailing list