I'm trying to convert some characters to the fullwidth form like this
tr 'abcdefghijklmnopqrstuvwxyz' '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/abcdefghijklmnopqrstuvwxyz/'
But still no help. I tried simpler versions of it
$ echo abca | perl -C -pe 's/a/a/g'
ï½bcï½
$ echo abca | perl -C -pe 'tr/a/a/'
ïbcï
It seems perl still treats multibyte UTF-8 characters as bytes
How can I convert those characters properly?