Wrong text encoding in patch view

There is html-powered view for commit diff http://gitlab.instance/grp/prj/-/commit/<commit sha> - it works okay and displays non-latin characters in diff quite okay:

image

Also, there is plain text view: http://gitlab.instance/grp/prj/-/commit/<commit sha>.patch

it renders non-latin characters in wrong encoding:

image

This regression makes it totally impossible to download and apply the patch.

Up to some point in the past, plain text view worked just fine.

Currently, we're using gitlab ce 17.9.2 official docker image

Just picked some random repo on gitlab.com and issue is reproduced there, too!

mbvyd/xmdc@46b8bb65 (patch)

Edited by Andrey