Fix Swedish åäö rendering as mojibake in PDF exports
buildSimplePdf's font declared no /Encoding at all, so PDF viewers fell back to a standard font's built-in encoding, which has no å/ä/ö glyphs - and separately, the content stream was written as UTF-8 instead of a single-byte encoding, so even a correctly-encoded font would receive the wrong bytes (a multi-byte UTF-8 sequence where PDF expects exactly one byte per character): the classic "åäö" mojibake pattern. Fixed by declaring /Encoding /WinAnsiEncoding and writing the content stream through a proper WinAnsi (~CP1252) byte mapper instead of UTF-8. This is the single shared renderer behind every PDF export (race results, start lists, heat sheets, team reports, the results archive), so the fix applies everywhere at once, matching what was reported. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "rc-racecore",
|
||||
"version": "1.7.0",
|
||||
"version": "1.7.1",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "rc-racecore",
|
||||
"version": "1.7.0",
|
||||
"version": "1.7.1",
|
||||
"hasInstallScript": true,
|
||||
"dependencies": {
|
||||
"better-sqlite3": "^12.11.1",
|
||||
|
||||
Reference in New Issue
Block a user