nano-devel
[Top][All Lists]
Advanced

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

Re: [Nano-devel] the default whitespace indicators


From: Mike Frysinger
Subject: Re: [Nano-devel] the default whitespace indicators
Date: Tue, 18 Mar 2014 22:53:46 -0400
User-agent: KMail/4.12.3 (Linux/3.13.0; KDE/4.12.3; x86_64; ; )

On Sun 16 Mar 2014 14:22:44 Benno Schulenberg wrote:
> On Mon, Mar 10, 2014, at 23:04, Mike Frysinger wrote:
> > if you look in src/rcfiles.c and look for 'Two single-column characters
> > required', you should be able to use that same logic to detect whether
> > those two chars are OK to use.
> 
> I don't think that that logic is good enough for detecting the use of UTF-8
> -- there are probably some other encodings that use two bytes per
> character, meaning that the bytes that represent "»·" in UTF-8 will likely
> not produce "»·" in those other encodings.
> 
> But there is a way to properly check for the use of UTF-8, and nano already
> does it, thru 'nl_langinfo()', in src/nano.c, line 2144:

yeah, i randomly learned of this method this last weekend while reading [1] 
for fun.  i also remembered that we're talking about a value which makes sense 
in a specific codeset (unicode), so tying it the char width (2) would break 
things in other wide character sets which aren't unicode.
-mike

[1] http://www.cl.cam.ac.uk/~mgk25/unicode.html

Attachment: signature.asc
Description: This is a digitally signed message part.


reply via email to

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