• 
      

    Proposed fix for post-review issue of posting non-ascii diffs

    Review Request #2568 — Created Aug. 31, 2011 and submitted — Latest diff uploaded

    Information

    RBTools
    master

    Reviewers

    Trying to post a review using post-review fails if the diff contains some non-ascii characters. For a more elaborate description, see the bug report. This fix was proposed by truan and it works for me. Thanks for considering it.
    
    Here is an example diff which makes post-review fail prior this fix and succeed after:
    
    diff --git a/config/locales/fr.yml b/config/locales/fr.yml
    --- a/config/locales/fr.yml
    +++ b/config/locales/fr.yml
    @@ -15,7 +15,7 @@ fr:
         log_in:             "Se connecter"
         logging_in:         "Connexion"
         login:              "Identifiant"
    -    login_failed:       "L'établissement de la connexion a échoué."
    +#    login_failed:       "L'établissement de la connexion a échoué."
         password_not_blank: "Veuillez entrer votre mot de passe."
         username_not_blank: "Veuillez entrer votre nom d'utilisateur."
         username_and_password_not_blank: "Veuillez entrer vos nom d'utilisateur et mot de passe."
    
    Feel free to cherry-pick this commit: https://github.com/jerboaa/rbtools/commit/dc48e01e116731594448a776483ee3729eb4255d
    Tested with above diff. Fails prior, succeeds after. I don't think this extra str() call is very problematic. Am I wrong?