Skip to content

Use the engine's UTF-8 to system-codepage converter#63

Merged
xroche merged 1 commit into
masterfrom
use-engine-utf8-converter
Jul 26, 2026
Merged

Use the engine's UTF-8 to system-codepage converter#63
xroche merged 1 commit into
masterfrom
use-engine-utf8-converter

Conversation

@xroche

@xroche xroche commented Jul 26, 2026

Copy link
Copy Markdown
Owner

The GUI was doing the MultiByteToWideChar/WideCharToMultiByte dance itself, because the engine exported nothing going back from UTF-8. xroche/httrack#698 adds hts_convertStringUTF8ToSystem, so delegate to it the way strdupt_utf8 already delegates in the other direction.

The helper also moves next to strdupt_utf8. Both are engine-boundary conversions, and having one of them sitting among the language-file routines was the reason the duplicate got written in the first place.

Needs the engine at xroche/httrack#698 or newer. CI builds engine master unpinned, so it picks that up by itself.

The GUI was doing the MultiByteToWideChar/WideCharToMultiByte dance itself
because the engine exported no way back from UTF-8. It does now, so delegate,
the way strdupt_utf8 already delegates in the other direction, and move the
helper next to it: both are engine-boundary conversions and belong together
rather than one of them sitting among the language-file routines.

Needs the engine at xroche/httrack#698 or newer, which CI picks up on its own
since it builds engine master unpinned.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019HXNEMWtyrkW7xoD8ewcR3
Signed-off-by: Xavier Roche <roche@httrack.com>
@xroche
xroche merged commit 9fa6b89 into master Jul 26, 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.

1 participant