mirror of https://github.com/dense-analysis/ale
Add Windows iconv conversion
This commit is contained in:
parent
4fca3824cc
commit
f21795f187
|
@ -275,6 +275,18 @@ function! ale#GetLocItemMessage(item, format_string) abort
|
||||||
" Windows may insert carriage return line endings (^M), strip these characters.
|
" Windows may insert carriage return line endings (^M), strip these characters.
|
||||||
let l:msg = substitute(l:msg, '\r', '', 'g')
|
let l:msg = substitute(l:msg, '\r', '', 'g')
|
||||||
|
|
||||||
|
if has('win32')
|
||||||
|
let l:to = &encoding
|
||||||
|
|
||||||
|
if l:to is# 'utf-8'
|
||||||
|
let l:res = iconv(l:msg, 'default', l:to)
|
||||||
|
|
||||||
|
if l:res isnot# '' && stridx(l:res, '?') == -1
|
||||||
|
let l:msg=l:res
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
return l:msg
|
return l:msg
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue