Fix the text-based attachment diffs with Unicode characters.
Review Request #7694 — Created Oct. 13, 2015 and submitted — Latest diff uploaded
The diff viewer code, which is used for text-based attachment diffs,
expects data to be converted to Unicode for display, and to do this, we
run the text throughconvert_unicode()
. However, this only happens if
there's an encoding list set up, which there isn't by default. Diffs
backed by repositories do this because we always have a default encoding
list, but there was no such logic here.Now, the diff viewer provides a default for the encoding list, and it
also unconditionally runsconvert_unicode()
. This allows text-based
attachments with Unicode characters to properly render.
Some file attachments I tried that were failing now properly render.