From 94385231d33d42c0b4ec80d5a5401d8c5fb23857 Mon Sep 17 00:00:00 2001 From: "Torsten Schulz (local)" Date: Fri, 17 Jul 2026 12:00:17 +0200 Subject: [PATCH] fix: update CSV import to correctly decode Windows-1252 encoding for venue names --- backend/services/matchService.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/backend/services/matchService.js b/backend/services/matchService.js index a8aedde4..d1b61581 100755 --- a/backend/services/matchService.js +++ b/backend/services/matchService.js @@ -72,9 +72,12 @@ class MatchService { async importCSV(userToken, clubId, filePath) { await checkAccess(userToken, clubId); let seasonString = ''; + const matches = []; try { const fileStream = fs.createReadStream(filePath) - .pipe(iconv.decodeStream('utf8')) + // click-TT exports this file as Windows-1252 / ISO-8859-1. + // Decoding it as UTF-8 corrupts umlauts in venue names and addresses. + .pipe(iconv.decodeStream('win1252')) .pipe(csv({ separator: ';' })); for await (const row of fileStream) { const parsedDate = parse(row['Termin'], 'dd.MM.yyyy HH:mm', new Date());