Skip to content

gh-153731: Handle NUL and lone surrogate in sqlite3 CLI REPL#153732

Open
tonghuaroot wants to merge 1 commit into
python:mainfrom
tonghuaroot:sqlite3-cli-nul
Open

gh-153731: Handle NUL and lone surrogate in sqlite3 CLI REPL#153732
tonghuaroot wants to merge 1 commit into
python:mainfrom
tonghuaroot:sqlite3-cli-nul

Conversation

@tonghuaroot

@tonghuaroot tonghuaroot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

In the python -m sqlite3 REPL, complete_statement() raises ValueError
(embedded NUL) or UnicodeEncodeError (lone surrogate), neither of which is a
sqlite3.Error, so a single such input line crashed the shell. Catch these two
and print an error, keeping the REPL running like the other error paths.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant