Loading ...
Sorry, an error occurred while loading the content.
 

converting text between encodings

Expand Messages
  • Valery Kondakoff
    Hello, Tony! ... TM :e ++enc=utf-8 will try to read the file, thinking that *the disk version* TM is encoded in utf-8. No wonder you get errors if you just
    Message 1 of 3 , Mar 21, 2003
      Hello, Tony!

      Friday, March 21, 2003, you wrote to me:

      >> What's wrong there? Why it's impossible to convert encodings from
      >> cp1251 to utf-8?

      TM> :e ++enc=utf-8 will try to read the file, thinking that *the disk version*
      TM> is encoded in utf-8. No wonder you get errors if you just wrote it in
      TM> cp1251!

      Aha!.. That is the point of this issue. I was (mistakely) thinking,
      that using ':e ++enc=...' I can freely _convert_ between "independent"
      encodings (no matter in which encoding the file was saved). But it
      turns out, that it just _reads_ the file in specified encoding. And if
      I want the conversion to be successful, I need to use '++enc' or
      'fileencoding' that corresponds to encoding of file on the disk.

      Sorry, my bad!

      TM> When you read a file, ++enc or (if no ++enc) 'fileencoding' must
      TM> correspond to what is on the disk.
      TM> When you write a file, it will we written to the disk in the
      TM> encoding specified by ++enc or (if no ++enc) by the 'fileencoding'

      Get it! Thank you for explanations: this helps me a lot - I hope I
      understand this issue now! :)

      Excuse me once again for asking silly questions in the list!

      --
      Best regards,
      Valery Kondakoff
      http://www.nbk.orc.ru (Ne Bey Kopytom)
      http://www.nbk.orc.ru/mtb (MTB riding in Moscow)

      PGP key: mailto:pgp-public-keys@...?subject=GET%20strauss@...

      np: Morrissey - We'll Let You Know (Your Arsenal (live))
    Your message has been successfully submitted and would be delivered to recipients shortly.