[tahoe-dev] [tahoe-lafs] #1135: reduce unnecessary escaping in quote_output

tahoe-lafs trac at tahoe-lafs.org
Thu Dec 30 23:43:48 UTC 2010


#1135: reduce unnecessary escaping in quote_output
-----------------------------------+----------------------------------------
     Reporter:  davidsarah         |       Owner:  somebody                       
         Type:  defect             |      Status:  new                            
     Priority:  major              |   Milestone:  1.8β                           
    Component:  code-frontend-cli  |     Version:  1.7.1                          
   Resolution:                     |    Keywords:  usability unicode review-needed
Launchpad Bug:                     |  
-----------------------------------+----------------------------------------

Comment (by davidsarah):

 For the benefit of reviewers, the POSIX shell escaping that this is
 ''approximately'' trying to emulate is specified
 [http://pubs.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html#tag_02_02
 here], except that that spec doesn't discuss Unicode. Generally when a
 Unicode character can be represented in the output encoding as itself, we
 do so, otherwise we use an \x, \u or \U escape (whichever is shortest).
 Interesting questions are:

  * is this a sensible way of escaping strings?
  * does it have any gratuitous inconsistencies with POSIX, C99, Python, or
 other escaping conventions that users might be used to, that could easily
 be fixed?
  * does the [source:src/allmydata/util/encodingutil.py at 4616#L138
 implementation] correspond to the comment?
  * are there important cases missing in the
 [source:src/allmydata/test/test_encodingutil.py at 4761#L294 tests]?

-- 
Ticket URL: <http://tahoe-lafs.org/trac/tahoe-lafs/ticket/1135#comment:12>
tahoe-lafs <http://tahoe-lafs.org>
secure decentralized storage


More information about the tahoe-dev mailing list