Skip to content

Commit 45139de

Browse files
committed
should be convert from utf-8
1 parent 84b173f commit 45139de

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

autoload/webapi/json.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ function! webapi#json#decode(json)
7676
let json = substitute(json, '\n', '', 'g')
7777
let json = substitute(json, '\\u34;', '\\"', 'g')
7878
if v:version >= 703 && has('patch780')
79-
let json = substitute(json, '\\u\(\x\x\x\x\)', '\=nr2char(str2nr(submatch(1), 16), 1)', 'g')
79+
let json = substitute(json, '\\u\(\x\x\x\x\)', '\=iconv(nr2char(str2nr(submatch(1), 16), 1), "utf-8", &encoding)', 'g')
8080
else
8181
let json = substitute(json, '\\u\(\x\x\x\x\)', '\=s:nr2enc_char("0x".submatch(1))', 'g')
8282
endif

0 commit comments

Comments
 (0)