Start a new file:
vile test
In vile set the file encoding:
:set file-encoding utf-8
....then enter the first unicode character directly:
"i","^V","u","0","2","1","9","return","escape"
....enter the mapping:
":","m","a","p","!"," ","^V","^K","s",",","
","^V","u","0","2","1","9","return"
....enter the character as digraphs:
"i","^K","s",",","escape"
.... exit vile with ":wq"
Now this is how the file looks like:
cat test
ș
ル
hexdump test
0000000 99c8 ef0a 88bf beef 0a99 000a
000000b
The correct ş character entered when in input mode, but something
strange happens when going through the mapping, at least on my
system. As mentioned above, this is FreeBSD-7, locale is set to
"en_US.UTF-8".
Christopher