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) <noreply@anthropic.com>
This commit is contained in:
KINDNICK 2026-04-30 13:48:20 +09:00
parent 5a44ca0492
commit 63c4c955c8

View File

@ -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() }