Skip to content

MTEXT decodes silently wrong on R2007+ (returns a garbage one-character string for every record) — needs the same string-stream port as LAYER/TEXT #25

Closed

Description

@DrunkOnJava

Found in #23: MTEXT (0x2C) on R2007+ files does not error — it decodes and returns "ѕ" (a single UTF-16 code unit read from the data stream) for every record, the same silent-wrong mode LAYER had before #23 fixed it. Silent wrong is worse than an error: the coverage report counts it as decoded.

Do: port src/entities/mtext.rs to the split-stream layout using src/string_stream.rs (trailer ends at payload_bits - handle_stream_bits + mc_field_bits, see the #23 finding and examples/probe_string_stream.rs); read text, style-related strings from the string stream in spec order (§19.4.44); add the self-validating end-of-data-fields check the other ports use and a BitWriter-built R2018 test; verify on sample_AC1032.dwg that MTEXT values are real text. Then audit every other entity with TV fields for the same silent failure (DIMENSION text overrides, HATCH pattern name, INSERT/BLOCK names, IMAGEDEF paths).

Activity

  1. added
    type:bug
    and removed on Oct 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    type:bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions