[erlang-questions] Fwd: String encoding and character set

Alex Arnon alex.arnon@REDACTED
Wed Jan 17 14:32:31 CET 2007


No they do not - the list is expected to contain byte values.

On 1/17/07, Dmitrii 'Mamut' Dimandt <dmitriid@REDACTED> wrote:
>
> Do list_to_binary/binary_to_list preserve codepoints? That is, does L1 =
> binary_to_list(list_to_binary(L2)) imply that L1 = L2? If not, then we loose
> an effective way of sending strings as binary
>
>
> Romain Lenglet wrote:
> > As Robert explained, the current convention for representing strings in
> > Erlang is a flat list of Unicode code-points as integers. Every element
> > in such a list is a character, represented by its Unicode code-point
> > integer value. The 11th character of a string is the 11th element in the
> > list. If you want to encode such a string, you are free to do so, and
> > that is relatively easy. But the current convention is to represent
> > strings *unencoded*, as such lists of Unicode code points.
> >
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://www.erlang.org/mailman/listinfo/erlang-questions
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20070117/5459dfc9/attachment.htm>


More information about the erlang-questions mailing list