Repository navigation
Pick up the parser's no-break-space whitespace and UTF-8-safe errors - #232
Merged
Merged
Conversation
openscad_cpp_parser#13: U+00A0, U+FEFF and a bare Latin-1 A0 are whitespace, as in OpenSCAD, and an 'unexpected character' message quotes a whole UTF-8 character. A no-break space in code failed to parse, and the message quoted its first byte alone, so converting it to a Python str raised 'nanobind::str(): conversion error' instead of the parse error (BelfrySCAD#679). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 5, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs BelfrySCAD/BelfrySCAD#679
Bumps
external/openscad_cpp_parserto BelfrySCAD/openscad_cpp_parser#13:A0are whitespace, as in OpenSCAD's lexer. OpenSCAD 2026.02 renderscube(1);<NBSP>silently; we failed to parse it.unexpected charactermessage quotes the whole UTF-8 character (or\xNNfor a byte that starts none). It quoted the first byte alone, so the Python binding raisednanobind::str(): conversion errorin place of the parse error.Testing
test_no_break_space_in_code_is_whitespace_and_errors_stay_decodable: passes on this build, fails on 1.37.0 with the nanobind error.🤖 Generated with Claude Code