use unicode:characters_to_binary instead of list_to_binary