cli: updated interface, fixed mswin compilation for utf16_to_utf8