On 06/11/09 09:49, Paolo Baruffa (wintec) wrote:
>
>
> to eveybody, I get right result using this settings:
>
> "-------------------------------------------
> " .vimrc
> "-------------------------------------------
> " autosense Dos,Unix,Mac
> :set ffs=dos,unix,mac
> " none settings for encoding...
> ":let&termencoding =&encoding
> ":set encoding=utf-8
> ":set encoding=latin1
> ":set encoding=utf-8
> " autosense Unicode-ISO 8859-1 and 15
> :set fileencodings=ucs-bom,utf-8,latin1,latin9
>
>
> "-------------------------------------------
> " in menu
> "-------------------------------------------
>
> :set fenc=latin1<CR>:set ff=dos<CR> "for ANSI DOS
> :set fenc=utf-8 bomb<CR> "for UNICODE Utf-8
>
> " also :set fenc=ucs-2le<CR> " for Windows Unicode
>
>
>
> (note than convert to "Utf-8 with signature"...
> also, note than :set fenc=latin9 and then :w! doesn't convert...
> but anyway I have a sequence which works to Unicode and reverse to ANSI!
> thx to everybody ;)
If the Euro sign is 0x80 then the file is NOT in Latin1 aka ISO-8859-1
(there is no Euro sign in Latin1), and also not in Latin9 aka
ISO-8859-15 (where the Euro sign is 0xA4), but it could be Windows-1252
(sometimes known as cp1252), where 0x80 is indeed the Euro sign. In
Unicode the Euro sign is assigned to codepoint U+20AC, represented on
disk in UTF-8 as 0xE2 0x82 0xAC.
IIUC, Windows-1252 and Latin1 are identical except for 0x80 to 0xBF,
which are (nonprinting) control characters in Latin1 and printable
characters in Windows-1252. Many Windows systems abusively call their
cp1252 charset "Latin1".
To see the available characters in any 8-bit non-EBCDIC encoding, use
(in a gvim with 'encoding' set to UTF-8)
:view ++enc=<encoding> alphabet.txt
on the attached file, replacing <encoding> by the charset's name. You'll
see characters 0x20 to 0xFF arranged in order, in 14 lines of 16. Vim
may say [Conversion error at line <number>], with the line number of the
first line where it couldn't convert, but that just means there are
bytes which should never happen in a file coded in the encoding you
chose. A "?" (question mark) placeholder appears instead of these
characters.
Best regards,
Tony.
--
"Based on what you know about him in history books, what do you think
Abraham Lincoln would be doing if he were alive today?
(1) Writing his memoirs of the Civil War.
(2) Advising the President.
(3) Desperately clawing at the inside of his coffin."
-- David Letterman
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---
!"#$%&'()*+,-./
0123456789:;<=>?
@ABCDEFGHIJKLMNO
PQRSTUVWXYZ[\]^_
`abcdefghijklmno
pqrstuvwxyz{|}~
¡¢£¤¥¦§¨©ª«¬®¯
°±²³´µ¶·¸¹º»¼½¾¿
ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏ
ÐÑÒÓÔÕÖרÙÚÛÜÝÞß
àáâãäåæçèéêëìíîï
ðñòóôõö÷øùúûüýþÿ