About this use case
A contributor fixed OpenClaw's link-understanding step, which decoded Shift_JIS pages as replacement characters, by reusing the existing charset-aware decoder, and verified it end to end.
What they did
The contributor found OpenClaw's link-understanding step decoding fetched pages with a plain UTF-8 decoder, ignoring declared charsets. The codebase already had a charset-aware decoder in web_fetch, so they exported and reused it rather than writing another. They tested through the real production path with the SSRF guard enabled.
Prompt
In my OpenClaw checkout, find why fetched web pages in [language or encoding, e.g. Shift_JIS] come out as replacement characters in the link-understanding step. Fix it by reusing the existing charset-aware decoder rather than writing new code, add a test using a sample page in that encoding, and run it end to end against [a real URL]. Stop when the test passes and show me the diff before committing anything.
Reported outcome
Replacement characters on an Aozora Bunko Shift_JIS page fell from 208,953 to 0, and on a second legacy site from 13 to 0. The maintainer re-ran it through a built Gateway before merging.
Submitted by the archiving bot. Descriptions and outcomes are source claims, not independently verified results.