From 63c4c955c8ccab18e29fc3ec783ed4e37981dae7 Mon Sep 17 00:00:00 2001 From: KINDNICK Date: Thu, 30 Apr 2026 13:48:20 +0900 Subject: [PATCH] Fix Korean encoding in CHANGELOG extraction (release.ps1) PowerShell 5.1 Get-Content defaults to system ANSI (cp949 in KR locale), which corrupted UTF-8 Korean text in release notes. Use .NET API [System.IO.File]::ReadAllText with explicit UTF-8 encoding instead. Co-Authored-By: Claude Opus 4.7 (1M context) --- release.ps1 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/release.ps1 b/release.ps1 index f6433e0..1e5b2e6 100644 --- a/release.ps1 +++ b/release.ps1 @@ -174,9 +174,11 @@ if ($DryRun) { $headers = @{ Authorization = "token $env:GITEA_TOKEN" } # Extract notes from CHANGELOG.md +# IMPORTANT: PowerShell 5.1 Get-Content defaults to ANSI; use .NET API for UTF-8 (Korean). $notes = "Release $Version" if (Test-Path CHANGELOG.md) { - $changelog = Get-Content CHANGELOG.md -Raw + $changelogPath = (Resolve-Path CHANGELOG.md).Path + $changelog = [System.IO.File]::ReadAllText($changelogPath, [System.Text.Encoding]::UTF8) $pattern = "## \[$([regex]::Escape($VersionRaw))\][\s\S]*?(?=`n## \[|\z)" $regexMatch = [regex]::Match($changelog, $pattern) if ($regexMatch.Success) { $notes = $regexMatch.Value.Trim() }