Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

utf-8 vim weirdness

By: a guest on Jul 3rd, 2011  |  syntax: Perl  |  size: 0.57 KB  |  views: 50  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
This paste has a previous version, view the difference. Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. # This line doesn't work properly in vim 7.2. It seems cursor/character positioning gets confused.
  2. my %test = ('utf-8' => [ 'wiki', 'â日本語é', 'çमानक हिन्दीà' ]);
  3. # 1. The problem is with the devanagari characters. There's only six of them: but 9-ish are displayed
  4. # 2. Go to end of line
  5. # 3. Observe that cursor doesn't go completely to end of line. Cursor goes to closing ] only
  6. # 4. Move cursor left character-at-a-time (arrow or h)
  7. # 5. Before you've reached the Kanji characters, one of the devanagari characters is replaced with an extraneous ]