-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 On November 16, 2014 10:45:03 PM EAT, Yuri Vic <[email protected]> wrote: >I look at some html file which is really in cp-1251 encoding. >Cyrillic characters are not shown properly, which is expected because >vim can't know the encoding. > >However, when I copy-and-paste such text (Shift-Y p), it stores it in >the destination file as different byte array. > >For example, bytes >cf ee f1 eb e5 e4 ed e8 e5 20 f2 e5 ec fb >are stored as >c3 8f c3 ae c3 b1 c3 ab c3 a5 c3 a4 c3 ad c3 a8 c3 a5 > >It appears, it probably tries to make it into some kind of UTF-8 >encoding (judging by 0xc3 bytes). But why does it do this? Since it >doesn't know the real encoding, it shouldn't modify bytes.
You are understanding it wrong. Check out :h 'filencodings': Vim *does* know the encoding using its own algorythm for guessing it, just it guesses it wrong because of its defaults. There is no such a thing as "unknown" encoding, any opened file is always read using some encoding and you cannot avoid that. > >~/.vimrc is empty >vim is built from FreeBSD port. -----BEGIN PGP SIGNATURE----- Version: APG v1.1.1 iQI1BAEBCgAfBQJUaRF6GBxaeVggPHp5eC52aW1AZ21haWwuY29tPgAKCRCf3UKj HhHSvptaD/wNAfgpFERsBAx0GElP4XSBPBmhmEPO1TJCLBrvrJsbr5I81eVVc4F9 zN3xsDug/DIZRWZcVkslwZYKMEQJX6zU7K2+d635+6Mo2/NVuPooeDWX0W4vON9T jXZlwG4Lnafyys/qVK+yrcQAGR3NYwsbUhgWXp9lkj87I4V2ROHDCC1opLFJhCXT U5sLgWxUidYRUC3/goiuWGnlshChfvmGzNADHWpNFaS1OnSLwku5hhgIskzy2gmh HcacjcgkqZ2O0aWJtZ9ta0COiTCVsKEpofH0sCFdugJSROp566VMjHp1puszNZa6 KNyq75DNgZ4rcjYs8jcIZoszD3xtLeBEmRMlAOz7LVVvBdyzCtDKuo4mH2k2PkrI pzS14b8X8roX+pejrC47P218vrEm16bzi5zgawZ864OrB1TUMOnPVsWCxaBFwxTi aRP+DuqiJuofGuPBs5pD9vAWUNyw6OvXhROLIMsanjO8FdA8KLlMx05LUa4ckSB3 ES2uvTvE4awkgvSrUOU0UcHFQSJSNG8xN6NE1kb0albFNjHvJe29BLUWAlq+38pt RbH4E7DbEWq0pBxCbVc3l+18dr5miEpqx2oEs+rHDu9/pHYTC/uqypDeoXbhWYfR WLOLlGeXFOA7e6vsZHOKNMSo+F8+kyVMk+Lc+yefRF8s/hMu89D4Nw== =fbcs -----END PGP SIGNATURE----- -- -- You received this message from the "vim_dev" 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_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
