This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: UTF-8 character encoding


On Thu, 21 Jun 2018 12:12:39, Houder wrote:
> On Wed, 20 Jun 2018 14:09:59, Lee wrote:
> > I'm looking at
> >   https://cygwin.com/packaging-hint-files.html#pvr.hint
> > and it starts off with
> >   Use UTF-8 character encoding.
> > 
> > How do I do that and how do I check that I actually did use UTF-8
> > character encoding _without_ using file?
> [snip]
> 
> > I used vi to create both files & I'd like to understand why file says
> > one is ascii & the other is utf-8
> 
> vim can tell you that in the statusline ...
> 
> :help statusline
> :help encoding
> 
> Ask Google to help you with the details: GS: "vim show encoding in status".
> 
> E.g.
> 
>  - http://vim.wikia.com/wiki/Show_fileencoding_and_bomb_in_the_status_line
>    (Show fileencoding and bomb in the status line)
> 
> As an example:
> 
> set laststatus=2
> "set statusline=...
> set statusline+=\ en:\ %{strlen(&enc)\ ?\ &enc\ :\ 'x'}
> "set statusline+...

Also read:

 - https://unix.stackexchange.com/questions/23389/how-can-i-set-vims-default-encoding-to-utf-8
   (How can I set VIM's default encoding to UTF-8?)

for a "quickstart" on the subject of character encoding/vim.

Henri


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]