[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [vile] problem with 'wide characters' (utf-8) under macosx

From: Thomas Dickey
Subject: Re: [vile] problem with 'wide characters' (utf-8) under macosx
Date: Sat, 6 Dec 2014 07:37:40 -0500
User-agent: Mutt/1.5.20 (2009-06-14)

On Sat, Dec 06, 2014 at 11:32:52AM +0100, j. van den hoff wrote:
> a further observation: the test file I've used just contains the lines
> ä
> ö
> i.e \u00E4 and \u00F6. in the show-variables list there is then one entry:
> $bufname = ä
> in both terminal emulators (urxvt, here is the
> strange thing (for me):
> in urxvt the file content is displayed properly, but `bufname' is
> diplayed as
>  $bufname = ä  (hope this goes through the mail as intended...)
> while in it's the other way round: the file content is
> diplayed via the
> utf-8 hexcodes and `bufname' appears correctly displayed as
> $bufname = ä.
> More important, I think I've found the "solution" just now:  I looked hard at
> my .vilerc again and found a setting `set file-encoding=auto' (it seemed to
> be required at one point in the past but I can't recall the reason why I
> added this anymore).  just deactivating it leads to proper display in the

The default is "locale", which seems to make most people happy...
> so it seems it was just my fault after all.  apologies for "spamming" the
> list ...  but while I am at it:  reading the help regarding `file-encoding'
> did not really clarify to me what was wrong with the `auto' setting (and then
> only for  any clarifications would be appreciated.

With "auto", vile inspects the file as it reads it, and decides what its
encoding is.  One problem with that approach is if you start with a plain
ASCII file and want to change it to UTF-8.  You can do that by doing

        :setl file-encoding=utf-8

before introducing the non-ASCII text.  (The "setl" is needed because
vile maintains that value as a local-setting for each buffer, and a plain
"set" will not tell it to revise its idea of a particular buffer).

Thomas E. Dickey <address@hidden>

Attachment: signature.asc
Description: Digital signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]