bugGNU nano - Bugs: bug #45579, nano finds both Unicode and...

 
 

bug #45579: nano finds both Unicode and ISO-8859-1 characters

Submitted by:  Benno Schulenberg <bens>
Submitted on:  Sun 19 Jul 2015 07:36:24 PM UTC  
 
Severity: 2 - MinorStatus: Fixed
Assigned to: Benno Schulenberg <bens>Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Thu 23 Jul 2015 08:08:15 PM UTC, comment #2:

The patch (extended for a backward search) went into SVN, r5316.

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.
Sun 19 Jul 2015 07:37:59 PM UTC, comment #1:

Attached patch forces nano to match only valid UTF-8 bytes.

(file #34465)

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.
Sun 19 Jul 2015 07:36:24 PM UTC, original submission:

(Bug was originally reported by Mike Frysinger in https://lists.gnu.org/archive/html/nano-devel/2009-02/msg00018.html.)

When, in a Unicode locale, a file contains not only UTF-8 characters but also characters encoded in ISO-8859-1, a search for some character will find both the UTF-8 and the invalid ISO-8859-1 ones.

To reproduce, do:

echo "0000000: 2020 c3ba 2020 c3bc 2020 fa20 20fc" | xxd -r >foo

Then run 'nano foo' in a Unicode locale and search for ú or ü, and see how nano finds each of them twice.

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #34465:  only-valid-sequences.patch added by bens (483B - text/x-diff)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by bens (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 6 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 07 Dec 2015 03:15:40 PM UTCbensOpen/ClosedOpen=>Closed
    Thu 23 Jul 2015 08:08:15 PM UTCbensSeverity3 - Normal=>2 - Minor
      StatusNone=>Fixed
      Assigned toNone=>bens
    Sun 19 Jul 2015 07:37:59 PM UTCbensAttached File-=>Added only-valid-sequences.patch, #34465
      Summarynano finds both unicode and ISO-8859-1 characters=>nano finds both Unicode and ISO-8859-1 characters

    Back to the top


    Powered by Savane 3.1-cleanup1