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:
parent
5a44ca0492
commit
63c4c955c8
@ -174,9 +174,11 @@ if ($DryRun) {
|
|||||||
$headers = @{ Authorization = "token $env:GITEA_TOKEN" }
|
$headers = @{ Authorization = "token $env:GITEA_TOKEN" }
|
||||||
|
|
||||||
# Extract notes from CHANGELOG.md
|
# Extract notes from CHANGELOG.md
|
||||||
|
# IMPORTANT: PowerShell 5.1 Get-Content defaults to ANSI; use .NET API for UTF-8 (Korean).
|
||||||
$notes = "Release $Version"
|
$notes = "Release $Version"
|
||||||
if (Test-Path CHANGELOG.md) {
|
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)"
|
$pattern = "## \[$([regex]::Escape($VersionRaw))\][\s\S]*?(?=`n## \[|\z)"
|
||||||
$regexMatch = [regex]::Match($changelog, $pattern)
|
$regexMatch = [regex]::Match($changelog, $pattern)
|
||||||
if ($regexMatch.Success) { $notes = $regexMatch.Value.Trim() }
|
if ($regexMatch.Success) { $notes = $regexMatch.Value.Trim() }
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user