[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Nano-devel] the default whitespace indicators
From: |
Jordi Mallach |
Subject: |
Re: [Nano-devel] the default whitespace indicators |
Date: |
Tue, 18 Mar 2014 00:07:15 +0100 |
El dg 16 de 03 de 2014 a les 14:22 +0100, en/na Benno Schulenberg va
escriure:
> 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:
>
> if (locale != NULL && (strcmp(nl_langinfo(CODESET),
> "UTF-8") == 0)) {
> #ifdef USE_SLANG
> SLutf8_enable(1);
> #endif
> utf8_init();
> }
>
> So I've used the result of that to add this to SVN:
>
> + if (using_utf8()) {
> + whitespace = mallocstrcpy(NULL, "»·");
Can I suggest not using middle dot, which is a valid character in
Catalan? Maybe a bullet, •,U+2022.
--
Jordi Mallach Pérez -- Debian developer http://www.debian.org/
address@hidden address@hidden http://www.sindominio.net/
GnuPG public key information available at http://oskuro.net/
- Re: [Nano-devel] the default whitespace indicators, Benno Schulenberg, 2014/03/04
- Re: [Nano-devel] the default whitespace indicators, Mike Frysinger, 2014/03/09
- Re: [Nano-devel] the default whitespace indicators, Benno Schulenberg, 2014/03/10
- Re: [Nano-devel] the default whitespace indicators, Dan Mahoney, System Admin, 2014/03/10
- Re: [Nano-devel] the default whitespace indicators, Mike Frysinger, 2014/03/10
- Re: [Nano-devel] the default whitespace indicators, Benno Schulenberg, 2014/03/16
- Re: [Nano-devel] the default whitespace indicators,
Jordi Mallach <=
- Re: [Nano-devel] the default whitespace indicators, Benno Schulenberg, 2014/03/18
- Re: [Nano-devel] the default whitespace indicators, Mike Frysinger, 2014/03/18
- Re: [Nano-devel] the default whitespace indicators, Mike Frysinger, 2014/03/18