Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Command :LatexView fails in directories with non-ASCII characters when encoding is set to utf-8 #249

Open
PeturBryde opened this issue Jun 17, 2015 · 0 comments

Comments

@PeturBryde
Copy link

This may be Windows-specific. The commmand :LatexView fails in directories with certain (maybe all) special characters if the Vim setting encoding is set to utf-8.
I have characters with accents (e.g. á é í ó) and other special characters in certain directory names. The command :LatexView works for, e.g. D:\My Documents\test\test.tex but not for D:\My Documents\testísl\test.tex or D:\My Documents\test\testísl.tex. Furthermore, compilation with :Latexmk works in the former case where the special character is in the directory name, but not in the latter case where the special character is in the file name (less important because I can refrain from using special characters in the file name, but sometimes the directory name is out of my control).

Looking over the definition of LatexBox_View in common.vim, I think it may have something to do with shellescape(outfile).

function! LatexBox_View(...)
let lvargs = join(a:000, ' ')
let outfile = LatexBox_GetOutputFile()
if !filereadable(outfile)
echomsg fnamemodify(outfile, ':.') . ' is not readable'
return
endif
let cmd = g:LatexBox_viewer . ' ' . lvargs . ' ' . shellescape(outfile)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant