asyncrun.vim icon indicating copy to clipboard operation
asyncrun.vim copied to clipboard

Encoding filenames

Open GianFrancoPastorale opened this issue 6 years ago • 3 comments

Hello, I use GVim (v8) on Windows. AsyncRun works fine with only ascii characters in filenames. With non ascii characters, I have problems (gcc in this example, but same with pdflatex): :AsyncRun gcc -Wall -o "$(VIM_FILENOEXT)" "$(VIM_FILENAME)"

output in quickfix:

|| [gcc -Wall -o "file with é in name" "file with é in name.c"]
|| gcc: error: file with +® in name.c: No such file or directory
|| gcc: fatal error: no input files
|| compilation terminated.
|| [Finished in 0 seconds with code 1]

The following one works fine (but kind of lose the interest of AsyncRun): :AsyncRun -mode=2 gcc -Wall -o "$(VIM_FILENOEXT)" "$(VIM_FILENAME)"

output in window vimrun.exe:

C:\windows\system32\cmd.exe /c (gcc -Wall -o ^"file with é in name^" ^"file with é in name.c^")
Hit any key to close this window...

I modified encoding, termencoding, g:asyncrun_encs = 'utf8' or latin1 or my current chcp cp850 etc. without more success. Where am I wrong? Is the problem related to issue #131?

GianFrancoPastorale avatar Jan 03 '19 15:01 GianFrancoPastorale

don't modify any of encoding or termencoding. try:

let g:asyncrun_encs='cp850'

skywind3000 avatar Jan 03 '19 15:01 skywind3000

Ok, I removed encoding and termencoding, and only left the line you suggested. But it only changed the representation of the "bad" character in the quickfix output:

|| [gcc -Wall -o "file with é in name" "file with é in name.c"]
|| gcc: error: file with + in name.c: No such file or directory
|| gcc: fatal error: no input files
|| compilation terminated.
|| [Finished in 0 seconds with code 1]

GianFrancoPastorale avatar Jan 03 '19 16:01 GianFrancoPastorale

Late answer, but letting only set encoding=utf-8 and let g:asyncrun_encs='cp850' in vimrc made the thing, so that's fine, the issue can be closed.

GianCarloPastorale avatar Jun 13 '20 16:06 GianCarloPastorale