dcmjs icon indicating copy to clipboard operation
dcmjs copied to clipboard

DicomMessage._read() Sets Decoder Too Late in Some Cases

Open ep5000 opened this issue 5 months ago • 1 comments

Looking at the function DicomMessage._read() and the following section:

if (cleanTagString === "00080005")  {
...
bufferStream.setDecoder(new TextDecoder(coding));

the above assumes that cleanTagString === "00080005" will be encountered before other encoded tags. If this does not hold true then this will be set too late.

ep5000 avatar Aug 07 '25 20:08 ep5000

Do you have example data that could be used to test this? I'm not sure this would ever come up in practice since the tags are always in order and this is the first on in the dictionary (https://dicom.nema.org/medical/dicom/current/output/html/part06.html).

pieper avatar Aug 07 '25 20:08 pieper