Skip to content

chore: normalize PowerShell files to UTF-8 BOM + CRLF and add .gitattributes - #5

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

chore: normalize PowerShell files to UTF-8 BOM + CRLF and add .gitattributes#5
luigilink merged 1 commit into
mainfrom
chore/encoding-normalization

Conversation

@luigilink

Copy link
Copy Markdown
Owner

Summary

Align SPSDBMove with the SPS* repositories encoding policy:

  • PowerShell files (.ps1) stored as UTF-8 with BOM, checked out with CRLF.
  • YAML, Markdown and JSON use LF without BOM.
  • Adds a root .gitattributes reusing the shared SPS* template.

Why

Windows PowerShell 5.1 reads BOM-less files as ANSI (the system code page), which corrupts non-ASCII characters. The BOM makes the encoding explicit and safe on SharePoint servers.

Scope

Encoding-only change — file contents are otherwise unchanged. The only per-file diff is the BOM on line 1 and the LF→CRLF line endings. No code logic, no config migration, no workflow changes.

Files re-encoded:

  • scripts/SPSDBMove.ps1
  • tests/SPSDBMove.Tests.ps1

Validation

  • Pester: 17/17 passing (Invoke-Pester -Path ./tests).
  • PSScriptAnalyzer (Error, Warning): 0 issues on ./scripts.

…ributes

Align SPSDBMove with the SPS* repositories encoding policy: PowerShell files
(.ps1) are stored as UTF-8 with BOM and checked out with CRLF; YAML, Markdown
and JSON use LF without BOM.

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

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

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown

Pester Test Results

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

Results for commit 66805db.

@luigilink
luigilink merged commit 0148b5f into main Sep 1, 2026
3 checks passed
@luigilink
luigilink deleted the chore/encoding-normalization branch September 1, 2026 15:13
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