[erlang-questions] unicode + version < 17.0

Benoit Chesneau bchesneau@REDACTED
Thu Apr 17 21:05:50 CEST 2014


finally I chosed the easy way:

https://github.com/benoitc/hackney_lib/commit/55de7ae0a1f5a0abd5836b52d7cea85951f3c3b8#diff-c8f112ac1af67f0503ac32dff7ae482fR264


On Thu, Apr 17, 2014 at 5:52 PM, José Valim <jose.valim@REDACTED
> wrote:

> 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/c40bb6d0/attachment.htm>


More information about the erlang-questions mailing list