Wednesday, December 6, 2017

Re: bad display of output utf-8 chars

Hello Ni Va,

As Tony said, "letter é (small latin letter e with acute) is represented
by 0x82" , so it is code page 850

I dont use Windows, but by googling, I found that you can open a command
terminal and use 'chcp' command to know which code page is set.

Then, you can try 'chcp 850', or 'chcp 1252', then use a command like
'gvim <your file>' if you can redirect your robocopy output to <your file>


Le 06/12/2017 à 15:29, Ni Va a écrit :
> Le mercredi 6 décembre 2017 01:39:33 UTC+1, Tony Mechelynck a écrit :
>> It seems that Vim doesn't recognise the charset in which Robocopy
>> wrote its output. For instance, it seems that the letter é (small
>> latin letter e with acute) is represented by 0x82 while in Latin1 it
>> would be 0xE9 (and therefore in Unicode it would be codepoint U+00E9,
>> represented in UTF-16le as E9 00 or in UTF-8 as C3 A9).
>>
>> Can you find out which code page is set in your locale (or "country
>> parameters" or whatever Windows calls it)? For instance, if it is
>> (let's say) code page 850, you can maybe open the file in Vim by means
>> of the command
>>
>> :view ++enc=cp850 filename.txt " readonly
>> or
>> :e ++enc=cp850 filename.txt " read-write
>>
>> replacing of course "filename.txt" by the actual name (and path, if
>> necessary) of the file. Similarly with another value after =cp if it
>> is another code page.
>>
>> See ":help ++opt" for details.
>>
>>
>> Best regards,
>> Tony.
>>
>> On Tue, Dec 5, 2017 at 5:31 PM, Ni Va <nivaemail@gmail.com> wrote:
>>> Hi,
>>>
>>> I use gvim 8.0.136x under windows 10 and got a bad display of output of robocopy tool.
>>>
>>>
>>>
>>> How can I fix it ?
>>> Thank you
>>> Nicholas
>>>
>>> --
>>> --
>>> 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.
> Hi Tony,
>
> In fact, I launch it through a job_start('robocopy "srcpath" "destpath" *.ico', out_cb).So, I get output of robocopy from my own out_cb job function.
>
> So how can I set the <good encoding charset> dealing with out of job_start call ?
>
> Nota : Even from microsoft knowledge, it's difficult to know which charset robocopy used. I've read that it can depend to the charset of executable cmd, or system.
>
>
>

--
--
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:

Post a Comment