Erlang libiconv binding (uses the new NIF api).
make
1> CD = iconverl:open("ucs-2be", "utf-8"). <<>> 2> iconverl:conv(CD, <<"text">>). {ok,<<0,116,0,101,0,120,0,116>>} 3> iconverl:conv(CD, <<"more text to convert">>). {ok,<<0,109,0,111,0,114,0,101,0,32,0,116,0,101,0,120,0, 116,0,32,0,116,0,111,0,32,0,...>>} 4> iconverl:conv("ucs-4", "latin1", <<"convert with a single function call">>). {ok,<<0,0,0,99,0,0,0,111,0,0,0,110,0,0,0,118,0,0,0,101,0, 0,0,114,0,0,0,...>>}