GNU nano - Bugs: bug #50403, statusbar character count should...
You are not allowed to post comments on this tracker with your current authentication level.
bug #50403: statusbar character count should count chars/codepoints not bytes
Submitter: | David Lawrence Ramsey <dolorous> | ||
Submitted: | Sat 25 Feb 2017 09:27:30 PM UTC | ||
Severity: | 3 - Normal | Status: | Fixed |
Assigned to: | bens | Open/Closed: | Closed |
Jump to the original submission
Tue 28 Feb 2017 03:49:20 PM UTC, comment #8: |
Benno Schulenberg <bens> |
Mon 27 Feb 2017 10:48:47 PM UTC, comment #7: That patch works too. |
David Lawrence Ramsey <dolorous> |
Mon 27 Feb 2017 08:23:57 PM UTC, comment #6: Yes, that seems to work. See attached patch. |
Benno Schulenberg <bens> |
Mon 27 Feb 2017 08:18:18 PM UTC, comment #5: The offending commit is 08c51cfd. So... this suggests to me that the solution is to not return a count of 1, but to return a count of 2 or 3 or 4. (I haven't tested this yet, but things worked before this commit, so...). Looking into it... |
Benno Schulenberg <bens> |
Sun 26 Feb 2017 06:23:15 PM UTC, comment #4: The attached patch should fix it. It's not that Unicode input only returns the first byte, it's that verbatim input outputs whatever it gets byte by byte, which is fine for everything except Unicode input, which needs the whole sequence read at once. |
David Lawrence Ramsey <dolorous> |
Sun 26 Feb 2017 11:46:41 AM UTC, comment #3: Bug exists since nano-2.6.3. |
Benno Schulenberg <bens> |
Sun 26 Feb 2017 09:59:02 AM UTC, comment #2: It works fine when typing Unicode characters directly. For example, when typing «ŝámpú» (the chevrons included) the character count is 7 -- which you can verify by copy/pasting the text.
|
Benno Schulenberg <bens> |
Sat 25 Feb 2017 09:48:59 PM UTC, comment #1: Addendum: I think this problem may also apply to typing in UTF-8 characters normally via the keyboard, instead of only in verbatim input mode, but with my keyboard and default settings, I have no way to test that at the moment. |
David Lawrence Ramsey <dolorous> |
Sat 25 Feb 2017 09:27:30 PM UTC, original submission:
(This is a similar problem to that of bug 48489, hence the similar title.)
|
David Lawrence Ramsey <dolorous> |
Depends on the following items: None found
Items that depend on this one: None found
There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.
Follow 9 latest changes.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2017-04-02 | bens | Open/Closed | Open | Closed | |
Summary | status bar character count should count chars/codepoints not bytes | statusbar character count should count chars/codepoints not bytes | |||
2017-03-07 | vapier | Summary | when using Unicode Input, the bytes should count as a single character | status bar character count should count chars/codepoints not bytes | |
2017-02-28 | bens | Status | In Progress | Fixed | |
2017-02-27 | bens | Attached File | - | Added minimal-needed-change.patch, #39841 | |
Status | None | In Progress | |||
2017-02-27 | bens | Assigned to | None | bens | |
2017-02-26 | dolorous | Attached File | - | Added 0001-input-fix-wrong-character-count-after-verbatim-Unico.patch, #39835 | |
2017-02-26 | bens | Summary | when Unicode input creates a valid character from invalid bytes, nano should adapt | when using Unicode Input, the bytes should count as a single character |
Powered by Savane 3.13-758e.
Corresponding source code
Fixed in git, 91910b23.