Skip to content

Support additional single-byte DBF codepages - #22

Merged
RandomChirp merged 2 commits into
FoxDevCommunity:mainfrom
edname:codex/windows-1257
Oct 6, 2026
Merged

RandomChirp merged 2 commits into
FoxDevCommunity:mainfrom
edname:codex/windows-1257

Conversation

@edname

@edname edname commented Oct 3, 2026

Copy link
Copy Markdown
Contributor

Support additional single-byte DBF codepages

The DBF reader recognizes many language-driver markers but decodes most of them
as CP1252. This turns Greek, Cyrillic, Baltic and other text into incorrect
characters, and writes can replace representable characters with question marks.

Add mappings for Windows 1250–1257, Thai 874 and DOS
437/737/850/852/857/860/861/863/865/866, retaining the existing pages. Both
decoding and encoding use the selected mapping. Correct marker 0x98 to Mac Greek
10006, while documenting that Macintosh codecs remain unimplemented.

Tests compare all byte values with referenced Microsoft mappings, exercise
character/memo writes followed by reopening, preserve binary memos, test field
widths and CPCONVERT, and import synthetic captions through the rebuilt WASM.
No new dependencies or application fixtures.

Validation on macOS ARM64: 121 Rust tests, 32 importer tests, rebuilt WASM,
typecheck, lint and build pass. Windows remains untested.

This is DBF codec support. Existing CP1252 fallback for unimplemented pages,
session-locale assumptions, DBCS, RTL and string built-ins remain separate work.
In particular, ALLTRIM currently truncates non-Latin-1 Unicode codepoints; that
can still corrupt correctly decoded text and is documented for follow-up.

Developed with AI assistance; checked with synthetic regression tests.

@RandomChirp

Copy link
Copy Markdown
Contributor

lgtm! Thoughts @jefflroberts ?

@RandomChirp
RandomChirp merged commit e74dc7d into FoxDevCommunity:main Oct 6, 2026
3 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