Sweep all .cshtml files for encoding corruption; add pre-commit guard

Replace all corruption variants with HTML entities across 226 view files:
- 3-char UTF-8-as-Win1252 sequences (ae-corruption)
- Standalone smart/curly quotes that break C# Razor expressions
- Partially re-corrupted variants where the 3rd byte was normalised to ASCII

tools/Fix-Encoding.ps1: re-runnable sweep; uses [char] code points so the
script itself never contains a literal non-ASCII character; supports -DryRun

.githooks/pre-commit: blocks commits containing the ae-corruption byte
signature (xc3xa2xe2x82xac); git core.hooksPath = .githooks so the
hook is repo-committed and active for all future work on this machine.

Build clean; 225 unit tests pass.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-20 21:37:10 -04:00
parent 21b39161a3
commit a0bdd2b5b4
252 changed files with 1785 additions and 1633 deletions
@@ -23,9 +23,9 @@
<div class="col-sm-6 col-md-3">
<div class="card border-warning">
<div class="card-body py-2 text-center">
<div class="small text-muted">Overdue (130 days)</div>
<div class="small text-muted">Overdue (1&ndash;30 days)</div>
<div class="fs-5 fw-bold text-warning">
@Model.Items.Where(i => i.AgingBucket == "130 Days").Sum(i => i.BalanceDue).ToString("C")
@Model.Items.Where(i => i.AgingBucket == "1&ndash;30 Days").Sum(i => i.BalanceDue).ToString("C")
</div>
</div>
</div>
@@ -65,9 +65,9 @@
{
var bucketClass = item.AgingBucket switch {
"Current" => "text-success",
"130 Days" => "text-warning",
"3160 Days" => "text-orange",
"6190 Days" => "text-danger",
"1&ndash;30 Days" => "text-warning",
"31&ndash;60 Days" => "text-orange",
"61&ndash;90 Days" => "text-danger",
"90+ Days" => "fw-bold text-danger",
_ => ""
};
@@ -85,12 +85,12 @@
}
</td>
<td>@item.InvoiceDate.ToString("MMM d, yyyy")</td>
<td>@(item.DueDate?.ToString("MMM d, yyyy") ?? "")</td>
<td>@(item.DueDate?.ToString("MMM d, yyyy") ?? "&mdash;")</td>
<td class="text-end">@item.Total.ToString("C")</td>
<td class="text-end text-success">@item.AmountPaid.ToString("C")</td>
<td class="text-end fw-semibold">@item.BalanceDue.ToString("C")</td>
<td class="text-end @bucketClass">
@(item.DaysOverdue > 0 ? item.DaysOverdue.ToString() : "")
@(item.DaysOverdue > 0 ? item.DaysOverdue.ToString() : "&mdash;")
</td>
<td><span class="badge @bucketClass bg-opacity-10 border">@item.AgingBucket</span></td>
<td><span class="badge bg-secondary-subtle text-secondary">@item.StatusDisplay</span></td>