Skip to content

fix: preserve Unicode text in trimming functions - #23

Merged
RandomChirp merged 1 commit into
FoxDevCommunity:mainfrom
edname:codex/unicode-trimming
Oct 7, 2026
Merged

RandomChirp merged 1 commit into
FoxDevCommunity:mainfrom
edname:codex/unicode-trimming

Conversation

@edname

@edname edname commented Oct 3, 2026

Copy link
Copy Markdown
Contributor

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.

@RandomChirp
RandomChirp merged commit f38230f into FoxDevCommunity:main Oct 7, 2026
4 of 6 checks passed
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