Problem
Body previews hardcode UTF-8 (utf8Preview, DefaultInstrumentationStep.kt:323) even though MediaType.charset is parsed and cached (MediaType.kt:53). A latin-1 body logs as mojibake; a gzip/binary body logs as U+FFFD noise.
Proposed change
Add previewText(bytes, mediaType) honouring the declared charset, plus a small isProbablyText heuristic (sample the first N code points) to skip previews for binary bodies. Land it in the shared emitter (see the emitter-extraction issue).
Acceptance
Dependencies
Priority: high · Effort: small
Problem
Body previews hardcode UTF-8 (
utf8Preview,DefaultInstrumentationStep.kt:323) even thoughMediaType.charsetis parsed and cached (MediaType.kt:53). A latin-1 body logs as mojibake; a gzip/binary body logs as U+FFFD noise.Proposed change
Add
previewText(bytes, mediaType)honouring the declared charset, plus a smallisProbablyTextheuristic (sample the first N code points) to skip previews for binary bodies. Land it in the shared emitter (see the emitter-extraction issue).Acceptance
Dependencies
Priority: high · Effort: small