Skip to content

Commit a0799c7

Browse files
author
Uwe Janke
committed
v1.8.17.0: Fix mojibake corruption risk in Docs/_gen-reference.ps1
Get-Content $file -Raw (without -Encoding UTF8) read sqmSQLTool-reference.html (no BOM) using the system ANSI codepage under Windows PowerShell 5.1, mis-decoding multi-byte UTF-8 characters (box-drawing chars, emoji) and permanently corrupting them on write-back. Found while regenerating the reference after today's docstring updates - a plain `powershell -File _gen-reference.ps1` run produced mojibake across the whole file; discarded and fixed instead of committing it. Added -Encoding UTF8. Verified clean under both PS 5.1 and PS 7 - the reference content itself was already current (todays changes only touched .DESCRIPTION/ .PARAMETER text, which this generator does not read; only .SYNOPSIS/.EXAMPLE feed the reference).
1 parent 4e12bd1 commit a0799c7

3 files changed

Lines changed: 18 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,21 @@
11
# sqmSQLTool — Changelog
22

3+
## [1.8.17.0] — 2026-07-02
4+
5+
### Bugfix
6+
7+
**Docs/_gen-reference.ps1** — Mojibake-Bug bei Ausfuehrung unter Windows PowerShell 5.1
8+
- `Get-Content $file -Raw` (ohne `-Encoding UTF8`) las `sqmSQLTool-reference.html`
9+
(keine BOM) unter PS 5.1 mit der System-ANSI-Codepage statt UTF-8. Mehrbyte-
10+
Zeichen (z. B. "─", Emojis) wurden dadurch falsch decodiert und beim
11+
Zurueckschreiben als kaputtes UTF-8 dauerhaft verstuemmelt (Mojibake).
12+
- Fix: `-Encoding UTF8` ergaenzt. Unter PS 5.1 und PS 7 getestet — reference.html
13+
bleibt bei erneuter Generierung inhaltlich unveraendert (143 Funktionen,
14+
Cards/Nav/Overview synchron), kein Mojibake mehr.
15+
- `sqmSQLTool-reference.html` selbst war bereits aktuell (unsere heutigen Docstring-
16+
Aenderungen betrafen nur `.DESCRIPTION`/`.PARAMETER`, die dieser Generator nicht
17+
ausliest — nur `.SYNOPSIS` und `.EXAMPLE` fliessen in die Referenz ein).
18+
319
## [1.8.16.0] — 2026-07-02
420

521
### Doku

Docs/_gen-reference.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ function Get-Meta([string]$name){
9191
[pscustomobject]@{ Syn=$syn; Examples=$ex }
9292
}
9393

94-
$htmlOrig = Get-Content $file -Raw
94+
$htmlOrig = Get-Content $file -Raw -Encoding UTF8
9595
$ovMap = @{}
9696
foreach($m in [regex]::Matches($htmlOrig,'<td class="psdb-st-ov-fn">([^<]+)</td><td>(.*?)</td>')){
9797
$ovMap[$m.Groups[1].Value] = $m.Groups[2].Value

sqmSQLTool.psd1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
RootModule = 'sqmSQLTool.psm1'
1818

1919
# Version number of this module.
20-
ModuleVersion = '1.8.16.0'
20+
ModuleVersion = '1.8.17.0'
2121

2222
# ID used to uniquely identify this module
2323
GUID = 'c4b10ba2-aee2-4d8d-ad86-a6e97c346ba6'

0 commit comments

Comments
 (0)