Wednesday, April 8, 2015

How to convert plain text from code page Windows 1250 to code page ISO 8859-2?

VIM 7.4 ON UBUNTU 14.04

1. Open Vim with command:
vim

2. Set internal Vim encoding to UTF-8:
:set encoding=utf-8

3. Open file that is encoded using Windows 1250 code page:
:e ++enc=cp1250 test.txt
Note: In status bar there is message: [converted]

4. Change file encoding to ISO 8859-2 code page:
:set fileencoding=iso-8859-2

5. Save the file and actually do the code page conversion:
:w
Note: In status bar there is message: [converted] written

Above steps works perfectly without a problem. But this is on Vim for Ubuntu.


Now a problem.


gVIM 7.4 ON WINDOWS 7

All steps the same as above. But at step 5 when I try to save a file I get an error:
"test.txt" E213: Cannot convert (add! to write without conversion).
See print-screen of error message: https://i.imgur.com/ZuVRpOK.png
See print-screen of gVim for Windows version: https://i.imgur.com/uWNE8ce.png

Any idea what is wrong on my Vim for Windows?

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