Quantcast

[converted] in status line

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[converted] in status line

malahal
When I open a file, VIM puts the following status line. What does
"converted" mean here? I couldn't find it in ":help statusline".

UNIX.txt" [converted] 21988L, 1087996C

Thanks, Malahal.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [converted] in status line

Tim Chase-2
> When I open a file, VIM puts the following status line. What
> does "converted" mean here? I couldn't find it in ":help
> statusline".
>
> UNIX.txt" [converted] 21988L, 1087996C

from ":help read-messages" (which, I'll admit, required a grep
through vim's documentation to find)

When reading a file Vim will display a message with information
about the read file.  In the table is an explanation for some of
the items.  The others are self explanatory.  Using the long or
the short version depends on the 'shortmess' option.

        long meaning ~
[...omitted...]
        [converted] conversion from 'fileencoding' to
                        'encoding' done

Looks like you've either got a fun setting for 'encoding' getting
set/sourced in your vimrc, or you're editing files that are
identifiable as 'fileencoding'.

-tim





Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [converted] in status line

malahal
Thanks. My .vimrc works fine with other files. My encoding is set to
'utf-8' as expected, but the fileencoding is set to 'latin1' when I open
*this* file. I used 'pdftotext' on a PDF file that is written using US
english to get a text file that reports this problem.

Thanks for the info, anyway.

Thanks, Malahal.

Tim Chase [[hidden email]] wrote:

> >When I open a file, VIM puts the following status line. What
> >does "converted" mean here? I couldn't find it in ":help
> >statusline".
> >
> >UNIX.txt" [converted] 21988L, 1087996C
>
> from ":help read-messages" (which, I'll admit, required a grep
> through vim's documentation to find)
>
> When reading a file Vim will display a message with information
> about the read file.  In the table is an explanation for some of
> the items.  The others are self explanatory.  Using the long or
> the short version depends on the 'shortmess' option.
>
> long meaning ~
> [...omitted...]
> [converted] conversion from 'fileencoding' to
> 'encoding' done
>
> Looks like you've either got a fun setting for 'encoding' getting
> set/sourced in your vimrc, or you're editing files that are
> identifiable as 'fileencoding'.
>
> -tim
>
>
>
>
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [converted] in status line

Tim Chase-2
> My encoding is set to 'utf-8' as expected, but the
> fileencoding is set to 'latin1' when I open *this* file. I
> used 'pdftotext' on a PDF file that is written using US
> english to get a text file that reports this problem.

I'm not sure what triggers vim to think that it's latin1 rather
than utf-8, but my first suspicion would be some character with
an ascii value greater than 0x7f which could create some bogus
utf-8 value (IIUC, particularly from Tony's recent epic tome of
Unicode adventures :). This in turn might lead vim to consider
the file non-utf-8, then perhaps falling back to latin1.

Just some thoughts while waitin' for the work whistle to blow :)

-tim



Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [converted] in status line

A.J.Mechelynck
In reply to this post by malahal
----- Original Message -----
From: <[hidden email]>
To: <[hidden email]>
Sent: Wednesday, July 27, 2005 9:50 PM
Subject: [converted] in status line


> When I open a file, VIM puts the following status line. What does
> "converted" mean here? I couldn't find it in ":help statusline".
>
> UNIX.txt" [converted] 21988L, 1087996C
>
> Thanks, Malahal.
>
>
>

It means that your file was read successfully, using a 'fileencoding'
different from your current 'encoding'. From your later post, I gather that
you had 'encoding' set to UTF-8 and that the file was read successfully as
Latin1. Apparently there was at least one character in the range 0x80-0xFF,
which caused the file not to be recognised as UTF-8. (Bytes with high bit
set can only appear in UTF-8 as part of multibyte sequences with a
well-defined format.)

[NOT converted] would have meant conversion was attempted and failed; but
[converted] is not an error. It just means that Vim "converts" the byte
representation on reading, and will convert it back on writing, so that
(hopefully) you will see what is actually in the file and not some garbled
(mistranslated) gibberish.

Best regards,
Tony.


Loading...