This blog has moved to http://kouk.surukle.me, leaving the following here for historical purposes.

Menu

unicode

Been using GRNET’s ViMA service a lot lately and sometimes it happens while using a vm’s console via VNC that I need to input a unicode character in a file. The VNC viewer applet that is provided, as well as any vncviewer I’ve tried can’t seem to manage inputing these characters directly via the keyboard. Here’s how I do it:

Ok, I was automating the creation of some ogg files based on title’s appearing in a text file. Doing it myself, with mplayer and oggenc, I hadn’t taken into account many of the caveats that preexisting ripping/encoding tools take care of, like the problem of forward slashes in filenames stored on a unix filesystem. But the good thing with doing it yourself is that you don’t have to automatically adopt the presuppositions that appear in preexisting tools.

One such presupposition is that you have to replace special characters in filenames, like quotes or forward slashes, so that they can be accessible to shell users. Well I have to say that shells and file managers are pretty advanced these days and you don’t really have to replace anything anymore. The only exception is forward slashes, which absolutely cannot appear in a filename on a unix system. Most tools replace the slash with an underscore character. I find that kind of lame.

So, since replacement of the slash is required in filenames, we can keep the visual nature of the forward slash by using the typographic solidus character as a replacement, which in unicode is called ‘SOLIDUS’ (U+002F). Here is the difference between the two (in the typeface your browser is using):

Slash (U+002f)

Solidus (U+2044)

/

⁄

In VIM you can input the solidus by typing Ctrl+V, u, 2044 in command mode.