[MacPorts] #34017: par mangles UTF-8 input with a non-breaking space character U+00A0

MacPorts noreply at macports.org
Thu Apr 12 09:28:10 PDT 2012


#34017: par mangles UTF-8 input with a non-breaking space character U+00A0
----------------------------+-----------------------------------------------
 Reporter:  kenh@…          |       Owner:  macports-tickets@…                   
     Type:  defect          |      Status:  new                                  
 Priority:  Normal          |   Milestone:                                       
Component:  ports           |     Version:  2.0.4                                
 Keywords:  par, UTF-8      |        Port:  par                                  
----------------------------+-----------------------------------------------
 Par isn't aware of UTF-8.  Normally it works fine, but I've run into one
 particular problem.  If you try to reflow UTF-8 text with a non-breaking
 space (U+00A0, encoded in UTF-8 as 0xC2 0xA0), the isspace() function
 returns true on the 0xA0, and par replaces that with a space character
 (0x20).  That messes up the UTF-8 and makes other utilities unhappy.

 The following patch (from the FreeBSD ports repository, not by me) solves
 this by checking to see if it's also an ascii character before treating it
 as a space.  Solves the problem for me.

-- 
Ticket URL: <https://trac.macports.org/ticket/34017>
MacPorts <http://www.macports.org/>
Ports system for Mac OS


More information about the macports-tickets mailing list