• 
      

    Fix UnicodeDecodeError when parsing SVN diffs with accents

    Review Request #7535 — Created July 22, 2015 and submitted — Latest diff uploaded

    Information

    Review Board

    Reviewers

    In ReviewBoard 2.0.x, uploading a SVN diff from a french-localized SVN yields a Unicode error when parsing the diff headers. French SVN diff have accents in them :

    Index: www/app/design/frontend/mobile/default/layout/page.xml
    ===================================================================
    --- www/app/design/frontend/mobile/default/layout/page.xml  (révision 20613)
    +++ www/app/design/frontend/mobile/default/layout/page.xml  (copie de travail)
    

    This causes the following error when uploading such a diff :

    UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 22: ordinal not in range(128)
    

    This patches fixes the issue by forcing a binary comparison, like the parse_diff_header function does.

    This patch fixed the bug on my RB site