Wednesday, May 27, 2015

How to uppercase the non-English characters using Windows-1250 code page?

Hi,
on gVim 7.4 on Windows 7 I have a text for example:
abcčšž
and I would like to get uppercase of this word, so final result should be all letters upper-cased:
ABCČŠŽ

TEST 1
1. Set code page: :set encoding=utf-8 fileencoding=utf-8
2. Type in text: abcčšž
3. Normal mode (go uppercase a word): gUaw
Result is: ABCČŠŽ
Working fine.

Note: Delete text with dd command before performing new test bellow.


TEST 2
1. Set code page: :set encoding=utf-8 fileencoding=cp1250
Repeat 2 and 3 from TEST 1.
Result is: ABCČŠŽ
Working fine.

Note: Delete text with dd command before performing new test bellow.


TEST 3
1. Set code page: encoding=cp1250 fileencoding=cp1250
Repeat 2 and 3 from TEST 1.
Result is: ABCčšž
English letters correctly upper-cased, but non-English letters not correctly upper-cased.

Why are non-English letters not converted if using both code page settings to cp1250? Is this a bug or something else? Do I need to set some other setting?

P.S. I like to use both encoding as cp1250, so when writing buffer to file with :write command I don't get the annoying "[converted]" message in status bar. I use cp1250 in 99% of the cases, but in rare cases I need to open non cp1250 file and I temporally set encoding to utf-8 and in this case the "[converted]" message is very useful, to now some code page conversion! was performed.

Note:
set encoding --> internal Vim encoding for buffers etc.
set fileencoding --> encoding file will be saved in when :write command is executed
utf-8 --> is UTF-8 universal code page
cp1250 --> Windows-1250 Latin 2 code page for Slavic languages




Thanks

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