Noman Maqsood Asked: 2019-11-20 02:17:01 +0800 CST2019-11-20 02:17:01 +0800 CST 2019-11-20 02:17:01 +0800 CST Convert string to UTF-8 with terminal only 772 How I can convert a string to UTF-8 encoding using Ubuntu terminal only? encoding utf-8 1 Answers Voted lese 2019-11-20T02:22:23+08:002019-11-20T02:22:23+08:00 iconv should do what you are looking for eg.: echo 'latin string' | iconv -t utf-8 > yourfileInUTF8 Edit: As suggested by damadam I removed the -f option since the string typed in terminal uses the default encoding -f, --from-code=NAME encoding of original text
iconv
should do what you are looking foreg.:
Edit: As suggested by damadam I removed the
-f
option since the string typed in terminal uses the default encoding