Hi Nikolay!
On Mi, 27 Mai 2015, Nikolay Pavlov wrote:
> This is not strange, tr is somewhat like tolower/toupper (as opposed
> to towlower/towupper):
>
> % echo 'abcабц' | iconv -t CP1251 > /tmp/enctest2
> % cat /tmp/enctest2 | LANG=ru_RU.CP1251 tr '[:lower:]' '[:upper:]'
> | iconv -f CP1251
> ABCАБЦ
> % cat /tmp/enctest2 | iconv -f CP1251 | tr '[:lower:]' '[:upper:]'
> ABCабц
>
> : it works only with single bytes. Each of the characters "čšž" in
> UTF-8 occupies more then one byte, thus you need to use CP1250 locale
> for this to work.
That seems to be correct. In a cp1250 locale, it works as expected:
#v+
~ % locale
LANG=de_DE.cp1250
LANGUAGE=
LC_CTYPE="de_DE.cp1250"
LC_NUMERIC="de_DE.cp1250"
LC_TIME="de_DE.cp1250"
LC_COLLATE="de_DE.cp1250"
LC_MONETARY="de_DE.cp1250"
LC_MESSAGES="de_DE.cp1250"
LC_PAPER="de_DE.cp1250"
LC_NAME="de_DE.cp1250"
LC_ADDRESS="de_DE.cp1250"
LC_TELEPHONE="de_DE.cp1250"
LC_MEASUREMENT="de_DE.cp1250"
LC_IDENTIFICATION="de_DE.cp1250"
LC_ALL=de_DE.cp1250
~ % tr '[:lower:]' '[:upper:]' < /tmp/enctest
ABCČŠŽ
#v-
> Cannot find this in `man tr` though, but `info tr` has
Args, Info files...
Not sure, what the problem for Vim is however.
Best,
Christian
--
Leserlichkeit ist die Höflichkeit der Handschrift.
-- Friedrich Dürrenmatt
--
--
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