On 1/22/09, Dimitris Mandalidis wrote:
>
> On Thu, Jan 22, 2009 at 05:04:01PM +0100, Tony Mechelynck wrote:
>
> Same bad results when removing ascii and/or ucs-bom. But I think the
>  problem is while writing the file;
...
>  * doing hexdump on the file what a get for a three-letter word (consecutive
>   letters) is :
>
>  0000000  bfef efbd bdbf bfef 0abd
>  000000a
>
>  I don't know how I 've to group these bytes, but it 's clear to me that
>  they don't correspond to the three consecutive letters I wrote.

They're grouped as (ef bf bd) x 3 + (0a)

Ie, 3 � characters followed by a linefeed.

>  The respective encoding values are be :
>
>  0xE1,0xE2,0xE3 for iso-8859-7 and

I don't know what's going wrong for you.  This all works fine for me.

$ echo $'\xE1\xE2\xE3' > file.iso
$ cat file.iso
���

# Makes sense; the file is in iso8859-7 and the terminal
# is using UTF-8..  Make a UTF-8 encoded copy of the file:

$ vim -c 'e ++enc=iso8859-7 file.iso' -c 'w ++enc=utf-8 file.utf' -c q
$ cat file.utf
αβγ

That looks good, so...

vim -u NONE -N
:set fileencodings=ucs-bom,utf-8,iso-8859-7
:e file.iso
:set fenc=utf-8
:w! file.utf
:!cat file.utf
[No write since last change]
αβγ

Do those exact steps yield something different for you, running in a
UTF-8 locale?

~Matt

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to