Skip to content

fix(stdlib): use UTF-8 boundaries for string assignment 馃У - #219

Merged
timfennis merged 1 commit into
masterfrom
bugfix/unicode-string-index-assignment
Sep 8, 2026
Merged

fix(stdlib): use UTF-8 boundaries for string assignment 馃У#219
timfennis merged 1 commit into
masterfrom
bugfix/unicode-string-index-assignment

Conversation

@timfennis

Copy link
Copy Markdown
Owner

Summary

  • translate character indexes to UTF-8 byte boundaries before mutating strings
  • fix both single-character and slice assignment for multibyte text
  • cover positive indexes, negative indexes, and Unicode slices with functional tests

Testing

  • cargo fmt --all -- --check
  • cargo test -p functional_tests --no-fail-fast
  • cargo test --workspace

The workspace test run passes with one pre-existing ndc_lsp test warning about an unnecessary qualification.

AI disclosure

This change was implemented with OpenAI Codex assistance.

@timfennis
timfennis force-pushed the bugfix/unicode-string-index-assignment branch from 1333230 to 35b07df Compare September 8, 2026 12:46
@timfennis
timfennis enabled auto-merge (squash) September 8, 2026 12:46
@timfennis
timfennis merged commit 4b35009 into master Sep 8, 2026
1 check passed
@timfennis
timfennis deleted the bugfix/unicode-string-index-assignment branch September 8, 2026 12:47
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