[erlang-questions] cookbook entry #1 - unicode/UTF-8 strings

Michael Uvarov freeakk@REDACTED
Mon Oct 24 18:02:19 CEST 2011


{string,[utf-8,plain],"this a new string type"}
It is already here, maybe in the more effective form.
It is easy to match too.

1> unicode:bom_to_encoding(<<16#FE, 16#FF>>).
{{utf16,big},2}
2> unicode:bom_to_encoding(<<16#EF, 16#BB, 16#BF>>).
{utf8,3}
3> unicode:bom_to_encoding(<<16#FF, 16#FE>>).
{{utf16,little},2}


-- 
Best regards,
Uvarov Michael



More information about the erlang-questions mailing list