Tuesday, December 8, 2020

encoding local to part of a buffer?

The "Changing encoding of an already loaded buffer" thread reminds me
that there are times I'd like to be able to look at a region of a file
in one encoding, and another region in a different encoding. Say, tell
vim everything between mark j and mark k is UTF-8 while everything
between mark u and mark i is ISO-8859-1?

My current method is to write the sections to temporary files, and
then open them as new buffers. Is there another, simpler way?

A typical use case for for me is an mbox file, where different messages
have arrived in (and are still stored in) different charsets. I can
imagine as another use case, data files with messages precomposed in
different encodings, something like a translations file for a program,
but I don't typically deal with such.

In general any sort of "multiple things presented in a single file"
might trigger this: editing ar files, tar archives, disk images,
etc.

Elijah

--
--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/4Cr8sq5DRzzfYm%40panix5.panix.com.

No comments: