bugfix/utf8 #38

Merged
darthrubik merged 2 commits from bugfix/utf8 into master 2026-07-10 16:02:35 -05:00
Owner
No description provided.
darthrubik added 2 commits 2026-07-10 16:02:18 -05:00
- Add test_encoding.sh with 11 tests for UTF-8 encoding validation and conversion
- Add -8 debug flag to test ensure_utf8 function with hex-encoded input
- Fix bug in ensure_utf8: check null terminator at loop start to prevent
  undefined behavior when reading past the end of the string
- Tests cover:
  - Valid ASCII passthrough
  - Valid UTF-8 2-byte, 3-byte, and 4-byte sequences
  - Latin-1 byte conversion (0xe9 -> c3a9)
  - Multiple Latin-1 bytes (café)
  - Isolated continuation byte conversion (0x80 -> c280)
  - Mixed valid/invalid bytes
  - Empty string handling
  - Integration test: read_file with non-UTF8 content
darthrubik merged commit eb161931bb into master 2026-07-10 16:02:35 -05:00
darthrubik deleted branch bugfix/utf8 2026-07-10 16:02:35 -05:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: darthrubik/drharness#38