Skip to content

Default insert-files --text to UTF-8 for files on disk - #953

Open
Mint0424 wants to merge 2 commits into
simonw:mainfrom
Mint0424:fix/insert-files-utf8-default
Open

Mint0424 wants to merge 2 commits into
simonw:mainfrom
Mint0424:fix/insert-files-utf8-default

Conversation

@Mint0424

@Mint0424 Mint0424 commented Nov 15, 2026 •

Copy link
Copy Markdown

Set the insert-files command's encoding option to the documented UTF-8 default. Disk files and standard input now use the same default. An explicit --encoding still controls decoding.

Fixes #952.

The regression runs the CLI with the POSIX C locale and Python's automatic UTF-8 mode disabled, then checks the text stored in SQLite. It fails before the fix.

Local validation on macOS and Python 3.12.13: the 10 insert-files tests passed. The full suite had 1,498 passing tests and 16 skips. Black and Flake8 passed for both changed files, and mypy passed for the package. The new locale regression is skipped on Windows because it requires the POSIX C locale.

Codex assisted with diagnosis, the change, and verification.


📚 Documentation preview 📚: https://sqlite-utils--953.org.readthedocs.build/en/953/

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.

insert-files --text uses the locale encoding despite documenting a UTF-8 default

1 participant