ben lieb wrote:
Alas, most of my clients give me text in Word Format. However even when
I cut-paste from Notepad into gvim certain characters don't convert
over, namely quotes (single, double) and diacritics (áé...). Instead '
for example turns into ¿.

When I pasted in a lot of text, it can be very hard to convert all the
characters back. What can I do to avoid this in the first place (besides
dropping Winbloze, since that's not an option)?

converted in Carolina,
Ben


1. On this mailing list, when you start a new topic, it is better to use "Write New Message" and not "Reply". The latter f***s up threading for the people who use it.

2. When pasting text which can contain "exotic" characters, make sure your 'encoding' can represent them. UTF-8 can, in principle, represent anything; but in some cases you may still have to ask yourself: In which encoding was the original text? The program which put the data into the clipboard did it know what it was doing? Does the OS support a Unicode clipboard?

3. For data coming from a Windoze app, setting 'encoding' and/or 'fileencoding' to cp1252 can often be a good choice. (Similarly, if the data came from a Mac you may want to try "macroman"; from Unix or from unknown sources: Latin1 [aka ISO-8859-1] or ISO-8859-15 [aka Latin9].) These are for "Western" text. For "Central European" Latin text, or for Greek, Cyrillic, Hebrew, Arabic, Devanagari, Chinese/Japanese/Korean or other scripts there are of course other values.

4. Remember: You cannot enter the data into Vim memory if your 'encoding' doesn't have a slot for it; and even if it does, you cannot save the data do disk if your 'fileencoding' isn't also able to represent it. Also, for most encoding conversions (but not between Latin1 and UTF-8 and not from US-ASCII to most other Latin encodings) you need iconv library support (i.e., has("iconv") must return a nonzero value).


Best regards,
Tony.

Reply via email to