I'm trying to convert some characters to the fullwidth form like this
tr 'abcdefghijklmnopqrstuvwxyz' 'ａｂｃｄｅｆｇｈｉｊｋｌｍｎｏｐｑｒｓｔｕｖｗｘｙｚ'
However, it doesn't work. I did a search and it turns out
tr doesn't support UTF-8. So based on the answer on that question I tried to use perl
perl -C -pe 'tr/abcdefghijklmnopqrstuvwxyz/ａｂｃｄｅｆｇｈｉｊｋｌｍｎｏｐｑｒｓｔｕｖｗｘｙｚ/'
But still no help. I tried simpler versions of it
$ echo abca | perl -C -pe 's/a/ａ/g' ï½bcï½ $ echo abca | perl -C -pe 'tr/a/ａ/' ïbcï
It seems perl still treats multibyte UTF-8 characters as bytes
How can I convert those characters properly?