Repository navigation
fix: preserve Unicode text in trimming functions - #23
Merged
Merged
Conversation
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.
Preserve Unicode text in trimming functions
ALLTRIM, LTRIM, RTRIM and TRIM currently truncate each character to its low byte.
Trimming spaces around decoded non-Latin-1 text therefore corrupts the result;
a character whose low byte is a space can even disappear.
Slice the retained text at character boundaries and use characters for explicit
parse arguments. Keep binary byte helpers and ALINES unchanged.
Validation: regression demonstrated before the fix; 77 focused Rust tests,
6 golden-suite tests and 9 WASM bridge tests pass. WASM build, typecheck, lint
and application build pass on macOS ARM64. Samples and fixtures are synthetic.
This preserves existing character-set parse behavior. Multi-character parse
strings, case flags, Varbinary semantics and other byte-based string functions
remain separate compatibility work. Native Windows VFP was not tested.
Developed with AI assistance; regression tests and the outgoing diff were reviewed.