Fix errors when trying to download raw diffs with unicode filenames.

Review Request #3558 — Created Nov. 25, 2012 and submitted — Latest diff uploaded

Information

Review Board
release-1.7.x

Reviewers

Fix errors when trying to download raw diffs with unicode filenames.

The filename field in the header would cause errors if the diff that was
uploaded had characters that weren't US-ASCII. This change adds an encoding step
that strips out any offending characters.

While I was in here, I changed the silly "bug%s" logic for filename fallbacks to
use rb-<id>.patch.
Created a diff named test\u1D121.diff and uploaded it. Downloaded the resulting raw
diff and saw it try to save with a filename of "test.diff"