You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Build and run EncodingFixTool as a native Linux64 executable. Make process, path, config, encoding, and Git handling platform-aware, and cover native Linux behavior including Unicode and rename/copy porcelain records.
Copy file name to clipboardExpand all lines: CHANGELOG.md
+11Lines changed: 11 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,16 @@
1
1
# Changelog
2
2
3
+
## [Unreleased]
4
+
5
+
### Added
6
+
7
+
- Added a native Delphi Linux64 build at `bin/Linux64/EncodingFixTool`, including native regression coverage for encoding repair, CRLF normalization, backups, XDG configuration, Git-changed scope, shell quoting, and case-sensitive paths.
8
+
9
+
### Changed
10
+
11
+
- Changed `EncodingFixTool.sh` to launch the native Linux64 executable directly instead of invoking the Windows EXE through WSL interoperability.
12
+
- Made Git execution, shell quoting, user config discovery, and path containment platform-correct; Linux avoids treating its UTF-8 default encoding as a legacy ANSI candidate while Windows retains active-code-page compatibility.
Copy file name to clipboardExpand all lines: README.md
+22-4Lines changed: 22 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
# EncodingFixTool
2
2
3
3
A fast, parallel, command-line fixer for Delphi source file encodings.
4
-
It scans a directory tree or one explicit file; detects UTF-8/ASCII vs. legacy single-byte encodings; repairs mixed lines (Windows-1250/1252/ANSI), and writes clean UTF-8 with an optional BOM. Line endings are preserved by default, or normalized to Windows CRLF when requested.
4
+
It scans a directory tree or one explicit file; detects UTF-8/ASCII vs. legacy single-byte encodings; repairs mixed lines (Windows-1250/1252, plus the active ANSI code page on Windows), and writes clean UTF-8 with an optional BOM. Line endings are preserved by default, or normalized to Windows CRLF when requested.
The launcher executes the Linux64 ELF binary directly. It does not start a Windows process and does not require WSL Windows interoperability or `wslpath`.
56
+
46
57
---
47
58
48
59
## Parameters
@@ -97,7 +108,7 @@ C:\bkp\src\foo\bar\Main.pas
97
108
* For each line, try:
98
109
99
110
***UTF-8 (strict)** — if it round-trips, use it.
100
-
***Windows-1250** (Central Europe/PL), **Windows-1252** (Western/DE), and **ANSI**— decode and **score**:
111
+
***Windows-1250** (Central Europe/PL) and **Windows-1252** (Western/DE)— decode and **score**. Windows builds also score the active system ANSI code page; Linux does not treat its UTF-8 default encoding as ANSI:
101
112
102
113
* +2 for valid Polish/German diacritics,
103
114
* +1 for typical source characters (letters/digits/whitespace/common punctuation),
@@ -165,6 +176,12 @@ For AI coding agents working in Delphi projects, run the cleanup from the reposi
This command is intentionally compact for agent workflows:
169
186
170
187
*`preset=delphi-ai` applies the Delphi cleanup defaults.
@@ -206,7 +223,7 @@ Example prompt:
206
223
After editing Delphi files, use the EncodingFix Delphi cleanup skill before running the build.
207
224
```
208
225
209
-
The skill itself is self-contained, but the `EncodingFixTool` executable must be available on `PATH` or via a repo-local path such as `.\bin\EncodingFixTool.exe`.
226
+
The skill itself is self-contained, but the platform executable must be available on `PATH` or through the repo-local Windows EXE / Linux shell launcher.
210
227
211
228
### Use with Claude Code
212
229
@@ -227,7 +244,8 @@ User-defined presets are JSON objects under a top-level `presets` key. Configura
227
244
Recommended locations:
228
245
229
246
* Repo-local: `.encodingfix.json`, discovered from `path` upward.
-`EncodingFixTool.dproj` builds a native Linux64 executable at `bin/Linux64/EncodingFixTool` while preserving Win32 and Win64 builds.
38
+
- Platform-sensitive process execution, Git integration, shell quoting, user config lookup, paths, encodings, and line endings behave correctly on Windows and Linux.
39
+
-`EncodingFixTool.sh` launches the native Linux64 binary directly without `wslpath` or Windows executable interop.
40
+
- Native Linux regression coverage verifies ELF execution, CRLF cleanup, legacy encoding conversion, config lookup, backups, case-sensitive paths, and Git paths including Unicode, rename, and copy records.
41
+
- README, agent-skill guidance, and CHANGELOG document the native Linux workflow.
Notes: The approved design keeps `sLineBreak` for platform-native console help and explicit `#13#10` for `eol=crlf`. Linux user config follows XDG with `$HOME/.config` fallback. RED/GREEN was strict for native artifact, Linux path containment, and Unicode Git paths; supplementary platform and rename/copy coverage was completed under GREEN.
Copy file name to clipboardExpand all lines: agent-skill/encodingfix-delphi-cleanup/SKILL.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,7 +28,7 @@ If unrelated user changes are dirty, avoid broad cleanup. Narrow `path=...`, ove
28
28
29
29
2. In a Git worktree, prefer the AI cleanup preset.
30
30
31
-
From WSL, run the Bash wrapperso WSL paths are converted before the Windows executable receives them. If the repo `bin` directory is on `PATH`, prefer:
31
+
From Linux or WSL, run the Bash wrapper. It launches the native Linux64 binary directly, so Linux paths are passed through unchanged and WSL Windows interoperability is not involved. If the repo `bin` directory is on `PATH`, prefer:
Copy file name to clipboardExpand all lines: agent-skill/encodingfix-delphi-cleanup/references/encodingfix-tool.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ Use this reference when the standard `preset=delphi-ai scope=git-changed` workfl
4
4
5
5
## Runtime Dependency
6
6
7
-
Prefer `EncodingFixTool` from `PATH`. If unavailable, use a repo-local executable such as `.\bin\EncodingFixTool.exe`.
7
+
Prefer `EncodingFixTool` from `PATH` on Windows or `EncodingFixTool.sh` on Linux/WSL. Repo-local paths are `.\bin\EncodingFixTool.exe` on Windows and `./bin/EncodingFixTool.sh` on Linux/WSL. The shell launcher executes `bin/Linux64/EncodingFixTool` directly and does not use Windows interoperability.
8
8
9
9
## Delphi AI Preset
10
10
@@ -55,6 +55,8 @@ Repo presets may live in `.encodingfix.json`; user presets may live in:
<Excluded_Packages Name="C:\Users\Public\Documents\Embarcadero\Studio\23.0\Bpl\wPDF5_DX14_Pack.bpl">File C:\Users\Public\Documents\Embarcadero\Studio\23.0\Bpl\wPDF5_DX14_Pack.bpl not found</Excluded_Packages>
212
-
<Excluded_Packages Name="$(BDSBIN)\dcloffice2k290.bpl">Microsoft Office 2000 Sample Automation Server Wrapper Components</Excluded_Packages>
213
-
<Excluded_Packages Name="$(BDSBIN)\dclofficexp290.bpl">Microsoft Office XP Sample Automation Server Wrapper Components</Excluded_Packages>
0 commit comments