alekciy@alekciy-home:~/projects/iconv$ erl -pa ebin -pa deps/*/ebin -noshell -eval 'application:start(iconv), Data=iconv:convert("utf-8", "cp1251", binary_to_list(<<"ТЕСТ"/utf8>>)), file:write_file("cp1251.erl.txt", Data).' -s init stop
alekciy@alekciy-home:~/projects/iconv$ xxd -g 1 cp1251.erl.txt
00000000: d2 c5 d1 d2 ....