On Sat, 13 Mar 2010, Brian Anderson wrote:
> Hello,
>
> I have a file that is not displaying some of the characters correctly.
> I looked in the help files and other places regarding file encodings,
> and formats, but couldn't find the answer. Probably something simple.
>
> The following characters are incorrect:
> Yaound<8e> --- should be "Yaounde" with an accent on the 'e'
> student’s ---- should be "student's"
> 2 – Upper --- should be " 2 -- Upper" (em-dash)
>
> I've opened the file in other text editors, and it shows correctly.
Can one of those other editors identify the character set for you?
The é of Yaoundé showing up as character 0x8e narrows it down to only a
handful, many of which might be the same (aliases for one another):
CP1282
CSMACINTOSH
MAC
MAC-CENTRALEUROPE
MAC-IS
MAC-SAMI
MACINTOSH
MACIS
I found that list through:
iconv -l | cut -f1 -d/ | sort | uniq | while read cs ; do
perl -Mbytes -lwe 'print chr 0x8e' \
| iconv -f $cs -t UTF-8 2>/dev/null \
| grep -q é \
&& echo $cs
done
Not sure what the corresponding Vim names would be, but it looks
Macintoshy (so, 'macroman'?). The other two characters, though ( ’ =
0x2019 and – = 0x2013 ) look like UTF-8. But, that might be due to how
you composed your email. (They correspond to 0xd0 and 0xd5 in what
iconv calls 'MAC'.)
--
Best,
Ben
--
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