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());