Bram Moolenaar wrote:
Patch 7.3.780
Problem: char2nr() and nr2char() always use 'encoding'.
Solution: Add argument to use utf-8 characters. (Yasuhiro Matsumoto)
Files: runtime/doc/eval.txt, src/eval.c
*** ../vim-7.3.779/runtime/doc/eval.txt 2012-12-05 16:10:21.000000000
+0100 --- runtime/doc/eval.txt 2013-01-23 17:00:52.000000000 +0100
***************
*** 1705,1711 ****
any call {func} with arguments {arglist}
ceil( {expr}) Float round {expr} up
changenr() Number current change number
! char2nr( {expr}) Number ASCII value of first char in {expr}
cindent( {lnum}) Number C indent for line {lnum}
clearmatches() none clear all matches
col( {expr}) Number column nr of cursor or mark
--- 1716,1722 ----
any call {func} with arguments {arglist}
ceil( {expr}) Float round {expr} up
changenr() Number current change number
! char2nr( {expr}[, {utf8}]) Number ASCII/UTF8 value of first char in
{expr} cindent( {lnum}) Number C indent for line {lnum}
clearmatches() none clear all matches
col( {expr}) Number column nr of cursor or mark
***************
*** 1862,1868 ****
mode( [expr]) String current editing mode
mzeval( {expr}) any evaluate |MzScheme| expression
nextnonblank( {lnum}) Number line nr of non-blank line >= {lnum}
! nr2char( {expr}) String single char with ASCII value {expr}
or( {expr}, {expr}) Number bitwise OR
pathshorten( {expr}) String shorten directory names in a path
pow( {x}, {y}) Float {x} to the power of {y}
--- 1873,1879 ----
mode( [expr]) String current editing mode
mzeval( {expr}) any evaluate |MzScheme| expression
nextnonblank( {lnum}) Number line nr of non-blank line >= {lnum}
! nr2char( {expr}[, {utf8}]) String single char with ASCII/UTF8 value
{expr} or( {expr}, {expr}) Number bitwise OR
pathshorten( {expr}) String shorten directory names in a path
pow( {x}, {y}) Float {x} to the power of {y}
***************
*** 2282,2295 ****
redo it is the number of the redone change. After undo it is
one less than the number of the undone change.
! char2nr({expr}) *char2nr()*
Return number value of the first char in {expr}. Examples: >
char2nr(" ") returns 32
char2nr("ABC") returns 65
! < The current 'encoding' is used. Example for "utf-8": >
char2nr("á") returns 225
char2nr("á"[0]) returns 195
! < |nr2char()| does the opposite.
cindent({lnum}) *cindent()*
Get the amount of indent for line {lnum} according the C
--- 2294,2310 ----
redo it is the number of the redone change. After undo it is
one less than the number of the undone change.
! char2nr({expr}[, {utf8}]) *char2nr()*
Return number value of the first char in {expr}. Examples: >
char2nr(" ") returns 32
char2nr("ABC") returns 65
! < When {utf8} is omitted or zero, the current 'encoding' is used.
! Example for "utf-8": >
char2nr("á") returns 225
char2nr("á"[0]) returns 195
! < With {utf8} set to 1, always treat as utf-8 characters.
! A combining character is a separate character.
! |nr2char()| does the opposite.
cindent({lnum}) *cindent()*
Get the amount of indent for line {lnum} according the C
Trying to apply results in:
patching file runtime/doc/eval.txt
Hunk #3 FAILED at 2282.
1 out of 3 hunks FAILED -- saving rejects to file runtime/doc/eval.txt.rej
Bye, Jojo
--
--
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