3929: Thumbnail for file attachements rendered using wrong encoding

ex***@dps-on******* (Google Code) (Is this you? Claim this profile.)
What version are you running?
Reviewboard 2.0.18
Also confirmed it exists in current 2.5 Beta 2 on demo server.

What's the URL of the page containing the problem?
/r/<id>

What steps will reproduce the problem?
1. Create new review request
2. Attach file with special chars (e.g. german umlauts)


What is the expected output? What do you see instead?
Attachement thumbnail shows correct chars.
Instead thumbnail shows question mark in a box (see screenshot).
After clicking 'Review' or 'Download' the file is displayed correctly so I assume the correct encoding is known by the server.

What operating system are you using? What browser?
Server
   Debian 7.8 (wheezy), Apache 2.2, Python 2.7.3
Client
   Firefox 39.0


Please provide any additional information below.
I attached the file I used to reproduce the problem, see New.txt.
This is a test attachement containing german umlauts: 
� � � � � � �
#1 ex***@dps-on******* (Google Code) (Is this you? Claim this profile.)
I also verified the problem exists on Chrome 44.
david
#2 david
What encoding is the attachment?
  • +NeedInfo
#3 ex***@dps-on******* (Google Code) (Is this you? Claim this profile.)
It is encoded in Windows CodePage 1252.