Skip to content

Handle non-ASCII characters in STEP files - #320

Draft
Ghesselink wants to merge 1 commit into
developmentfrom
feature/IVS-919-non-ascii-tokens
Draft

Handle non-ASCII characters in STEP files#320
Ghesselink wants to merge 1 commit into
developmentfrom
feature/IVS-919-non-ascii-tokens

Conversation

@Ghesselink

Copy link
Copy Markdown
Contributor

My WIP, feel free to use it @rw-bsi :)

- Decode ISO 10303-21 string escapes (\X2\..\X0\, \X4\, \X\, \S\, \P?\) when
  reading the header, so company/application names are stored and shown
  decoded instead of as raw escape sequences
- Never expose raw subprocess stderr as a syntax outcome: translate the
  parser's UnicodeDecodeError into a user-facing message with the correct
  line/column and a hint about \X2\ escapes
- Recompute the reported position for non-ASCII characters from the actual
  file; the header-only parser reports the wrong line
- Resolve the renamed simple_spf parse-error class so header parse failures
  land in "syntax_error" again
- Add fixtures and tests for raw UTF-8, latin-1 and \X2\-escaped headers
@Ghesselink
Ghesselink requested a review from rw-bsi August 17, 2026 19:51
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.

1 participant