Skip to content

JSON output no longer escapes non-ASCII characters, new --ascii option#777

Merged
simonw merged 2 commits into
mainfrom
claude/sqlite-utils-unicode-escaping-gevwa0
Jul 6, 2026
Merged

JSON output no longer escapes non-ASCII characters, new --ascii option#777
simonw merged 2 commits into
mainfrom
claude/sqlite-utils-unicode-escaping-gevwa0

Conversation

@simonw

@simonw simonw commented Jul 6, 2026

Copy link
Copy Markdown
Owner

refs:

sqlite-utils query/rows/search/tables/views/triggers/indexes/memory now
output JSON with ensure_ascii=False, so unicode text like 日本語 is emitted
directly instead of as \uXXXX escape sequences. This matches how values
were already stored on insert (jsonify_if_needed) and how CSV/TSV output
already behaved.

A new --ascii flag on all of those commands restores the previous escaped
output, for systems that cannot handle UTF-8.

Also applies ensure_ascii=False to the convert --multi --dry-run preview
(matching what would actually be stored) and to plugins listing output.

Co-Authored-By: Claude Fable 5 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_01JaHan1NhaTRAxJ9LQtSLf9

claude added 2 commits July 6, 2026 18:02
sqlite-utils query/rows/search/tables/views/triggers/indexes/memory now
output JSON with ensure_ascii=False, so unicode text like 日本語 is emitted
directly instead of as \uXXXX escape sequences. This matches how values
were already stored on insert (jsonify_if_needed) and how CSV/TSV output
already behaved.

A new --ascii flag on all of those commands restores the previous escaped
output, for systems that cannot handle UTF-8.

Also applies ensure_ascii=False to the convert --multi --dry-run preview
(matching what would actually be stored) and to plugins listing output.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JaHan1NhaTRAxJ9LQtSLf9
@codecov

codecov Bot commented Jul 6, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 80.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 95.29%. Comparing base (d516e58) to head (823b334).

Files with missing lines Patch % Lines
sqlite_utils/cli.py 80.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #777   +/-   ##
=======================================
  Coverage   95.29%   95.29%           
=======================================
  Files           9        9           
  Lines        3652     3652           
=======================================
  Hits         3480     3480           
  Misses        172      172           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@simonw
simonw merged commit 815b6a7 into main Jul 6, 2026
107 checks passed
@simonw
simonw deleted the claude/sqlite-utils-unicode-escaping-gevwa0 branch July 6, 2026 18:10
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.

2 participants