Repository navigation
Fix non-ASCII characters in generated release notes - #2460
Open
Tino Teuber (tino-teuber) wants to merge 1 commit into
Open
Tino Teuber (tino-teuber) wants to merge 1 commit into
Tino Teuber (tino-teuber) wants to merge 1 commit into
Conversation
GetReleaseNotes returned the Invoke-WebRequest response object. Callers piped it into ConvertFrom-Json, which converts it with ToString() and replaces every non-ASCII character (umlauts, typographic quotes, ...) with '?'. Return the response content instead, so CreateReleaseNotes and BuildReferenceDocumentation get the correctly decoded JSON. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues remain for the change to preserve non-ASCII characters in generated release notes.
No open issues 🎉
What changed in this PR
Fixes #2459 by preserving non-ASCII characters in generated release notes for Create Release and reference documentation.
Changes:
- Returns the JSON response content from
GetReleaseNotes, avoiding the response-object string conversion that corrupts characters. - Adds a regression test covering umlauts and typographic quotes.
- Documents the fix in the release notes.
| File | Description |
|---|---|
| Tests/GitHub-Helper.Test.ps1 | Adds a regression test for non-ASCII release-note content. |
| RELEASENOTES.md | Records the fix for issue #2459. |
| Actions/Github-Helper.psm1 | Returns .Content from GetReleaseNotes for existing JSON-parsing callers. |
Review effort: Balanced
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
❔What, Why & How
The release notes generated by Create release lose umlauts and other non-ASCII characters (
PrüfungbecomesPr??fung).GetReleaseNotesreturned theInvokeWebRequestresponse object and its callers piped that object intoConvertFrom-Json. The object is then converted withToString(), which replaces every non-ASCII character with?before the text reachesGITHUB_OUTPUT. GitHub sends correct UTF-8 (charset=utf-8); the text is damaged on the AL-Go side.GetReleaseNotesnow returns the response content (.Content), like the other helpers inGithub-Helper.psm1that parse JSON fromInvokeWebRequest. Both callers (CreateReleaseNotes.ps1andBuildReferenceDocumentation.ps1) already pipe the result intoConvertFrom-Jsonand need no change; the existingCreateReleaseNotesunit tests already mockGetReleaseNoteswith a JSON string, so they now match the real return value.Tests:
GetReleaseNotesinTests/GitHub-Helper.Test.ps1. It emulates the Windows PowerShell 5.1ToString()behaviour and asserts that umlauts and typographic quotes survive. It fails without the fix.GitHub-Helper,CreateReleaseNotesandBuildReferenceDocumentationPester tests pass in Windows PowerShell 5.1 and PowerShell 7.GetReleaseNotesof v8.3, v10.0 and current main returnsPr??fungin Windows PowerShell 5.1 against a local server (details in the issue).Related to issue: #2459
✅ Checklist
🤖 Generated with Claude Code