release 3.0: pdf: fix failure exporting issue pdf with UTF-8 U+FFFD (#1918)

> When users add special characters to issues (often by copy/pasting text from terminals to issue journals), they cannot export these issues to PDF and get an error (invalid byte sequence in UTF-8).

added by @linki
Indent `when` as deep as `case`.<br>Prefer single-quoted strings when you don't need string interpolation or special symbols.