On 26/12/12 09:00, mattn wrote:
Hi, bram and all.

In some times, I want to use utf-8 character based char2nr/nr2char.
Currently, char2nr/nr2char works depend on locale characters. But I guess 
someone hope to use utf-8 character based char2nr/nr2char.
I added second argument which treat first argument as utf-8.

https://gist.github.com/1686178


char2nr() and nr2char() use your current 'encoding', which may be other than the locale you had at startup and even than your current ":language ctype".

I recommend to set your 'encoding' to utf-8 near the top of your vimrc (if the current Vim is compiled with +multi_byte). See how at http://vim.wikia.com/wiki/Working_with_Unicode

Note that if you change 'encoding' after some file has been loaded for editing, you run the risk of corrupting that file's text (unless it happens to consist entirely of 7-bit US-ASCII characters).


Best regards,
Tony.
--
Sweater, n.:
        A garment worn by a child when its mother feels chilly.

--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

Raspunde prin e-mail lui