characters_to_list vs characters_to_binary

Ngoc Dao ngocdaothanh@REDACTED
Fri Oct 2 07:11:36 CEST 2009


I am using Erlang R13B02-1 with Japanese data.

The doc of unicode module says that their results are the same, only
one in list and one in binary. But:

unicode:characters_to_list([230,151,165,230,156,172,232,170,158,231,137,136]).
=> [230,151,165,230,156,172,232,170,158,231,137,136]

unicode:characters_to_binary([230,151,165,230,156,172,232,170,158,231,137,136]).
=> <<195,166,194,151,194,165,195,166,194,156,194,172,195,168,
194,170,194,158,195,167,194,137,194,136>>

Is there something wrong?


More information about the erlang-questions mailing list