In a document that declares no charset, a reference like img src="s.svg#café" reaches the mirror with the fragment double-encoded: the UTF-8 bytes c3 a9 come out as c3 83 c2 a9, so the emitted fragment is #caf%C3%83%C2%A9 and the selector no longer matches.
This happens before the --single-file pass runs, and the mirrored control (a plain crawl, no --single-file) already contains the doubled bytes, so the encoding step is upstream of the inliner. Found while reviewing #804, whose fragment escaping faithfully encodes whatever it is handed and is not the cause.
Worth checking against the charset-detection path more generally, since the same double-encode would affect any non-ASCII text taken from a charset-less document, not just fragments.
In a document that declares no charset, a reference like
img src="s.svg#café"reaches the mirror with the fragment double-encoded: the UTF-8 bytesc3 a9come out asc3 83 c2 a9, so the emitted fragment is#caf%C3%83%C2%A9and the selector no longer matches.This happens before the
--single-filepass runs, and the mirrored control (a plain crawl, no--single-file) already contains the doubled bytes, so the encoding step is upstream of the inliner. Found while reviewing #804, whose fragment escaping faithfully encodes whatever it is handed and is not the cause.Worth checking against the charset-detection path more generally, since the same double-encode would affect any non-ASCII text taken from a charset-less document, not just fragments.