Wednesday, June 4, 2014

Re: Why vim doesn't insert cyrillic symbols properly in Ex mode?

On Wednesday, June 4, 2014 12:59:58 PM UTC-5, Stas Malavin wrote:
> To make changes in several files I use the following script:
>
>
>
> echo search('publications.html"') | normal o<li><a href="./book_series.html">Книжные серии</a></li>
>
> echo search('collections.html"') | d
>
> echo search('photo.html"') | d
>
> wq
>
>
>
> Then I do
>
> for file in *.html do; vim -e $file < script; done
>
>
>
> As a result a string "^Z=86=K5 A5@88" is inserted instead of "Книжные серии". All html files as well as the script itself are utf-8 encoded, and no other problems with Cyrillic revealed. What's going on?
>
>
>
> Thanks in advance for any comment!


I assume this is your stackoverflow post:


http://stackoverflow.com/questions/24019364/why-vim-doesnt-insert-cyrillic-symbols-properly-in-ex-mode

From there you mentioned: 'encoding' in Vim is set to utf-8, and "scriptencoding utf-8" doesn't fix anything.

I'm wondering, if you start Vim in ex mode "vim -e", whether encoding is set to utf-8 then? I think there may be a different set of config files being loaded.

Or maybe the problem is not Vim, but rather it is your terminal? I don't know enough about working with the terminal to say whether or not "< script" will send the correctly encoded stuff to Vim. If it does, perhaps Vim needs 'termencoding' set differently from its current setting. What is 'termencoding' set to?

Have you tried using "-S script" instead of "-e ... < script"?

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