Thursday, December 7, 2017

Re: bad display of output utf-8 chars

On Thu, Dec 7, 2017 at 3:44 PM, Ni Va <nivaemail@gmail.com> wrote:
> Le jeudi 7 décembre 2017 00:59:53 UTC+1, dwierenga a écrit :
>> On Wed, Dec 6, 2017 at 3:18 PM, Ni Va <niva...@gmail.com> wrote:
>> Yes thank you Tony and Mr Gentis,
>>
>>
>>
>> Enter chcp under windows console return 850 so you're right Tony.
>>
>> So i can try to redirect robocopy's output even if it is so far of my idea ( getting output data live at runtime)
>>
>>
>>
>>
>>
>>
>> robocopy.exe has an explicit /UNICODE flag to control the output encoding. You may want to try that before re-architecting your process to deal with redirected output.
>
>
> For the moment it works with my output showmessages func fixed.
>
> function! sequencerutil#showmessages() abort " {{{
> let debug_file=tempname()
> exe 'redir! > ' . debug_file .'|silent messages|redir END'
> call setqflist(readfile(debug_file))
> set encoding=cp850
> copen
> endfunc "}}}
>
>
>
> Nota : /UNILOG option causes errors combined with /MIR that I need

Changing 'encoding' anywhere other than your vimrc (which is sourced
before loading the first editfile) can have disastrous results,
because it changes how the contents of all text in Vim memory is
interpreted but it doesn't reload any files already in memory. If at
that moment you already have another file loaded (a help file, maybe:
some of them, including options.txt for the 'langmap' example, are in
"true" UTF-8) it could become hopelessly garbled.

Alas, ":copen" doesn't accept a ++enc modifier.

Best regards,
Tony.

--
--
You received this message from the "vim_use" 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

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments: