Skip to content

chore: normalize PowerShell files to UTF-8 BOM + CRLF - #15

Merged
luigilink merged 1 commit into
mainfrom
chore/encoding-normalization
Aug 28, 2026
Merged

luigilink merged 1 commit into
mainfrom
chore/encoding-normalization

Conversation

@luigilink

Copy link
Copy Markdown
Owner

Summary

Align SPSTrust with the shared SPS* encoding policy (SPSUpdate / SPSWeather / SPSUserSync / SPSFbaSync): PowerShell files (.ps1/.psm1/.psd1) stored as UTF-8 with BOM and checked out with CRLF; YAML/Markdown/JSON kept as LF, no BOM.

Changes

  • Add a root .gitattributes encoding the policy above.
  • Re-encode every PowerShell file under src/ and tests/ to UTF-8 with BOM + CRLF.

Why

Windows PowerShell 5.1 (used on SharePoint servers) reads BOM-less files as ANSI (the system code page), which corrupts any non-ASCII character. A UTF-8 BOM makes the encoding explicit and safe.

Notes

Encoding-only change: file contents are otherwise unchanged. No version bump, no tag — this ships with the next functional release.

Validation

PSScriptAnalyzer: 0 findings
Pester:           88 passed / 0 failed

…ributes

Align SPSTrust with the shared SPS* encoding policy (SPSUpdate / SPSWeather /
SPSUserSync / SPSFbaSync):

- Add a root .gitattributes that stores .ps1/.psm1/.psd1 as UTF-8 with BOM and
  checks them out with CRLF, while keeping YAML/Markdown/JSON as LF with no BOM.
- Re-encode every PowerShell file under src/ and tests/ to UTF-8 with BOM + CRLF.

Windows PowerShell 5.1 (used on SharePoint servers) reads BOM-less files as ANSI
(the system code page), which corrupts any non-ASCII character; a UTF-8 BOM makes
the encoding explicit and safe.

Encoding-only change: file contents are otherwise unchanged.
@github-actions

Copy link
Copy Markdown

Pester Test Results

88 tests   88 ✅  2s ⏱️
17 suites   0 💤
 1 files     0 ❌

Results for commit 0e2ff56.

@luigilink
luigilink merged commit 14b5d30 into main Aug 28, 2026
3 checks passed
@luigilink
luigilink deleted the chore/encoding-normalization branch August 28, 2026 17:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant