Skip to content

Instantly share code, notes, and snippets.

@RJ
Created February 21, 2011 22:39
Show Gist options
  • Save RJ/837841 to your computer and use it in GitHub Desktop.
Save RJ/837841 to your computer and use it in GitHub Desktop.
-module(utf8test).¬
-compile(export_all).¬
¬
¬
b2l(B) when is_binary(B) ->¬
lists:reverse(b2l(B,[])).¬
¬
¬
b2l(<<>>, Acc) -> Acc;¬
b2l(<<Char/utf8,Rest/binary>>, Acc) ->¬
b2l(Rest, [Char|Acc]).¬
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment