fix: widen file information and decode DICOM text encodings

This commit is contained in:
SantaSpeen committed 2026-10-22 11:20:33 +03:00
1 parent a69fdf2e09
commit b87f8cb961
13 files changed
+279 -33

No files matched your search

+25 -1
View File
@@ -49,6 +49,30 @@ assert.ok(
)
);
assert.ok(!replies[2]?.metadata.some((entry) => entry.tag === "(7FE0,0010)"));
self.onmessage({
data: {
id: 4,
mode: "metadata",
buffer: fixture(16, {
charset: "ISO_IR 192",
patientBytes: [0xe3, 0xcd, 0xe3, 0xcf],
}),
},
});
assert.equal(replies[3]?.encoding, "windows-1256");
assert.ok(replies[3]?.metadata.some((entry) => entry.value === "محمد"));
self.onmessage({
data: {
id: 5,
mode: "metadata",
buffer: fixture(16, {
charset: "WINDOWS-1256",
patientBytes: Array.from(new TextEncoder().encode("Иван^Петров")),
}),
},
});
assert.equal(replies[4]?.encoding, "utf-8");
assert.ok(replies[4]?.metadata.some((entry) => entry.value === "Иван Петров"));
console.log(
"Production DICOM worker: decode, frame switching and metadata passed"
"Production DICOM worker: decode, metadata and text encodings passed"
);