What happened?
Hubble renders BOM-marked UTF-16 text files as mojibake instead of decoding them. This was reported during WinGet verification with ChangedFiles.txt and is reproducible on current main (0.1.25).
The editor currently reads every editable text file with fs.readFile(resolved, "utf8"). A UTF-16 file therefore appears as text such as ��\0C\0h\0a\0n\0g\0e\0d....
How can we reproduce it?
- Create
ChangedFiles.txt encoded as UTF-16LE or UTF-16BE with a BOM. Windows PowerShell 5.1 redirection commonly produces UTF-16LE files.
- Open its parent folder in Hubble Desktop.
- Open
ChangedFiles.txt.
- Observe replacement characters and NUL-separated letters instead of the file contents.
What did you expect to happen?
Hubble should detect a UTF-16 BOM, decode the file correctly, and preserve its encoding when saving edits.
What actually happened?
The file is decoded as UTF-8 and displayed as mojibake. Editing and saving is higher risk: the preload encodes the corrupted editor string as UTF-8, which can irreversibly rewrite the original file.
Screenshots, videos, logs, or notes
Original WinGet verification report and screenshot: microsoft/winget-pkgs#408140 (comment)
Current implementation areas:
apps/desktop/electron/main.ts: desktop:read-file-text assumes UTF-8
apps/desktop/electron/main.ts: content search also assumes UTF-8
apps/desktop/electron/preload.ts: saves encode editor strings as UTF-8
No duplicate issue found.
App version
Reproduced on current main (0.1.25); originally reported against 0.1.21 on Windows.
Does this block your work?
Partially — I have a workaround
Acceptance criteria
Blocked by
None - can start immediately
What happened?
Hubble renders BOM-marked UTF-16 text files as mojibake instead of decoding them. This was reported during WinGet verification with
ChangedFiles.txtand is reproducible on currentmain(0.1.25).The editor currently reads every editable text file with
fs.readFile(resolved, "utf8"). A UTF-16 file therefore appears as text such as��\0C\0h\0a\0n\0g\0e\0d....How can we reproduce it?
ChangedFiles.txtencoded as UTF-16LE or UTF-16BE with a BOM. Windows PowerShell 5.1 redirection commonly produces UTF-16LE files.ChangedFiles.txt.What did you expect to happen?
Hubble should detect a UTF-16 BOM, decode the file correctly, and preserve its encoding when saving edits.
What actually happened?
The file is decoded as UTF-8 and displayed as mojibake. Editing and saving is higher risk: the preload encodes the corrupted editor string as UTF-8, which can irreversibly rewrite the original file.
Screenshots, videos, logs, or notes
Original WinGet verification report and screenshot: microsoft/winget-pkgs#408140 (comment)
Current implementation areas:
apps/desktop/electron/main.ts:desktop:read-file-textassumes UTF-8apps/desktop/electron/main.ts: content search also assumes UTF-8apps/desktop/electron/preload.ts: saves encode editor strings as UTF-8No duplicate issue found.
App version
Reproduced on current
main(0.1.25); originally reported against0.1.21on Windows.Does this block your work?
Partially — I have a workaround
Acceptance criteria
.txtand Markdown files display correctly.Blocked by
None - can start immediately