Skip to content

Conversation

Copy link

Copilot AI commented Dec 22, 2025

FinTS protocol returns bank statement data in latin1 encoding, but the client was decoding as utf-8, causing German umlauts (ä, ö, ü, ß) to display incorrectly.

Changes

  • Changed encoding from utf-8 to latin1 in Client.statements() method when parsing booked transactions
// Before
const unprocessedStatements = await read(Buffer.from(bookedString, "utf-8"));

// After
const unprocessedStatements = await read(Buffer.from(bookedString, "latin1"));

Ports the fix from upstream Prior99#34.

Original prompt

Kannst du bitte die Problembehebungen von hier auch übernehmen.

Prior99#34


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: larsdecker <1968186+larsdecker@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix issues from pull request #34 Fix latin1 encoding for German umlauts in bank statements Dec 22, 2025
Copilot AI requested a review from larsdecker December 22, 2025 01:14
@larsdecker larsdecker marked this pull request as ready for review December 22, 2025 01:14
Copilot AI review requested due to automatic review settings December 22, 2025 01:14
@larsdecker larsdecker merged commit 303dbcb into master Dec 22, 2025
4 checks passed
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes an encoding issue in the FinTS client where German umlauts (ä, ö, ü, ß) were displaying incorrectly in bank statement data. The fix changes the character encoding from UTF-8 to latin1 (ISO-8859-1) when parsing MT940-formatted bank statements, which is the correct encoding used by the FinTS protocol.

  • Changed Buffer.from(bookedString, "utf-8") to Buffer.from(bookedString, "latin1") in the statement parsing logic
  • Ports an upstream fix from Prior99#34
  • Aligns with existing encoding usage in the codebase (ISO-8859-1 is already used in utils.ts and parse.ts)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants