[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Nano-devel] Comment/Uncomment feature patch
From: |
Benno Schulenberg |
Subject: |
Re: [Nano-devel] Comment/Uncomment feature patch |
Date: |
Sat, 21 May 2016 20:01:50 +0200 |
On Sat, May 21, 2016, at 18:07, Mike Scalora wrote:
> Does nano support multibyte encoding other than UTF-8?
No. See in nano.c, where it checks nl_langinfo for being "UTF-8"
before it will activate the multibyte stuff. (Also, somewhere
in move_mbleft() we assume that we can step back four bytes and
then safely resynchronize. Possibly not all multibyte encodings
can do that.)
> Is this "permitted"?
>
> if (is_blank_mbchar(s+p) || (mblen(s+p, MB_CUR_MAX) == 1 && s[p] == '\r'))
Yes. But you don't even need the mblen() -- in utf8 it is impossible
that one code is part of another code. So this is enough:
if (is_blank_mbchar(s+p) || s[p] == '\r'))
Benno
--
http://www.fastmail.com - The way an email service should be
- Re: [Nano-devel] Comment/Uncomment feature patch, (continued)
- Re: [Nano-devel] Comment/Uncomment feature patch, Benno Schulenberg, 2016/05/18
- Re: [Nano-devel] Comment/Uncomment feature patch, Mike Scalora, 2016/05/18
- Re: [Nano-devel] Comment/Uncomment feature patch, Benno Schulenberg, 2016/05/19
- Re: [Nano-devel] Comment/Uncomment feature patch, Mike Scalora, 2016/05/19
- Re: [Nano-devel] Comment/Uncomment feature patch, Benno Schulenberg, 2016/05/19
- Re: [Nano-devel] Comment/Uncomment feature patch, Mike Scalora, 2016/05/20
- Re: [Nano-devel] Comment/Uncomment feature patch, Benno Schulenberg, 2016/05/21
- Re: [Nano-devel] Comment/Uncomment feature patch, Mike Scalora, 2016/05/20
- Re: [Nano-devel] Comment/Uncomment feature patch, Benno Schulenberg, 2016/05/21
- Re: [Nano-devel] Comment/Uncomment feature patch, Mike Scalora, 2016/05/21
- Re: [Nano-devel] Comment/Uncomment feature patch,
Benno Schulenberg <=
- Re: [Nano-devel] Comment/Uncomment feature patch, Mike Scalora, 2016/05/22
- [Nano-devel] getting ready to merge the Comment/Uncomment feature, Benno Schulenberg, 2016/05/22
- Re: [Nano-devel] getting ready to merge the Comment/Uncomment feature, Mike Scalora, 2016/05/22
- Re: [Nano-devel] getting ready to merge the Comment/Uncomment feature, Benno Schulenberg, 2016/05/25
- Re: [Nano-devel] Comment/Uncomment feature patch, Benno Schulenberg, 2016/05/19
- Re: [Nano-devel] Comment/Uncomment feature patch, Benno Schulenberg, 2016/05/15