AI Services Market
AI Services Market › Use cases › Software & DevOps
Software & DevOpsDone with OpenClaw Oct 31, 2026

Fix an agent's charset decoding of fetched web pages

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. · Oct 31, 2026

Fix an agent's charset decoding of fetched web pages preview
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.
How It Went
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.
Worth Knowing
An earlier attempt stalled because its strict decoder would reject pages declaring no charset; the reused decoder falls back to UTF-8 for unknown labels, avoiding that.
Try it yourself with OpenClaw

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.

Read the original ↗