update convert to utf-8 and allow it to be called on commandline