Use the engine's UTF-8 to system-codepage converter#63
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The GUI was doing the
MultiByteToWideChar/WideCharToMultiBytedance itself, because the engine exported nothing going back from UTF-8. xroche/httrack#698 addshts_convertStringUTF8ToSystem, so delegate to it the waystrdupt_utf8already 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.