nano-devel
[Top][All Lists]
Advanced

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

Re: [Nano-devel] adding a word-completion feature to nano


From: Sumedh Pendurkar
Subject: Re: [Nano-devel] adding a word-completion feature to nano
Date: Sat, 29 Oct 2016 03:28:01 +0530
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0

Hi,


On Saturday 29 October 2016 01:02 AM, Benno Schulenberg wrote:

ŝampu
chère

Then type <Enter> ŝa ^]
It says: ŝadds.
Typing ^] again, it says: ŝallowing

Not good.  It doesn't see the ŝ as forming part of a word.
But it should.  Selecting those two words, and running the
internal spell checker on them says it cannot find the word
"ampu".  Hmmm...  There seems to be something wrong with
the word-forming determination.  That will have to be fixed
first.
Hmm..
Typing <Enter> ch ^]
it says: ch�
It produces an invalid byte.

Your code is not entirely UTF-8 compatible.

I am new to utf8. So I haven't read enough about it.
Please correct my mistakes if I make any.
I just looked into the code and just ran the code on paper.
1)is "è" a single byte? (maybe 2 as even I copy paste it disabling utf8 to delete it I had to press 2 backspaces to delete the garbage value printed)
Just an explanation why I thought that might be the case:
ch ^] would store "ch" in shard as usual
It checks in that line for ch. It matches and exits the second for loop(with j as iterator) successfully as ch exists in both. Then it checks if next byte is a mb_char or not(Which surprisingly returns true) and then it is copied in the completion and thus its length becomes 3 bytes and it is output is seen on screen. (note: if it is two bytes. the second byte was not a word forming character thats why it signaled the end of word).

Also, after the git pull.
if i do ./autogen.sh;./configure;make;
It says that using_utf8 not declared. I think it should be as I have attached in the patch. I might have been mistaken even.

Also,
./configure --enable-utf8
put this on the terminal.
*** UTF-8 support was requested, but insufficient UTF-8 support was
*** detected in your curses and/or C libraries.  Please verify that your
*** slang was built with UTF-8 support or your curses was built with
*** wide character support, and that your C library was built with wide
*** character support.



Thanks & Regards,
Sumedh Pendurkar

Attachment: 0003-Maybe-a-bug.patch
Description: Text Data


reply via email to

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