[erlang-questions] Fwd: String encoding and character set
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 <> 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
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions