Aglet

Investigate Character Encoding During Import

Investigation needs both the intended text and its original bytes. The visible result alone may fit several explanations, including decoding with the wrong character set or decoding an already transformed value again. Follow a controlled value through each transformation instead of guessing from its final appearance.

Build a useful investigation brief

  1. Build an explicit encoding pair

    Create small fixtures representing the same supported text in the encodings the importer accepts. Record the exact producer and expected characters. Include text that distinguishes the encodings, an optional byte-order mark where applicable, and a deliberately invalid sequence with a documented expected rejection.

  2. Inspect each text transformation

    Trace upload, decoding, parsing, validation, storage, and rendering. Record the representation at each stage using sanitized values. Look for a second conversion applied to text that has already been decoded, and distinguish encoding changes from intentional normalization such as whitespace or line-ending handling.

  3. Compare selected and inferred paths

    Run the same bytes through an explicit encoding choice and the automatic path, if both exist. Keep parser dialect and field mapping fixed. A successful explicit choice narrows the investigation to inference or setting handoff; failure in both paths suggests a later transformation needs inspection.

What to carry forward

Produce the smallest byte fixture, intended value, selected decoding rule, and first incorrect transformation. State whether detection, conversion, storage, or display is implicated by evidence. Avoid a broad character-replacement workaround that hides the symptom while changing legitimate text or leaving the original decoding mistake unresolved.

Technical background: PostgreSQL documentation.

Keep the decision with the work.

Use a Work Item in Aglet to record the problem, the evidence you have, and the next decision. Add an owner and priority, then keep updates in the discussion so the next person can follow the reasoning.

Create an account See the product workflow