Project

General

Profile

Actions

Conformance #1112

closed

oficonv accepts Shift-JIS multi-byte characters when ISO_IR 13 (JIS X0201) is active

Added by Marco Eichelberg over 1 year ago. Updated over 1 year ago.

Status:
Closed
Priority:
Normal
Category:
Library and Apps
Target version:
-
Start date:
2024-03-07
Due date:
% Done:

100%

Estimated time:
2:00 h
Module:
Operating System:
Compiler:

Description

Currently, the oficonv implementation of character set conversion will silently accept two-byte Shift-JIS characters when ISO_IR 13 (JIS X0201) is active as the current input character set. Shift-JIS is true superset of JIS X0201 (which by itself is a single-byte character set). DICOM does not support Shift-JIS. It would be preferrable thus if oficonv would report an error in these cases, like the GNU libiconv implementation does.

In the attached sample file,
  • attribute (0010,4000) contains the byte sequence "b1\41\5c\1b\24\42\25\22\23\41\21\40", which is a valid ISO 2022 ISO_IR 13/ISO 2022 ISO_IR 87 string.
  • attribute (0020,4000) contains the byte sequence "b1\41\5c\83\41\82\60\81\5f". This generates the same Kanji characters though Shift-JIS codes, which are not allowed in DICOM.

Dump the file with dcmdump +U8 shift_jis_example.dcm to demonstrate the effect.

Reported 2024-03-04 by David Gobbi <> and Mathieu Malaterre <>.


Files

shift_jis_example.dcm (5.34 KB) shift_jis_example.dcm Marco Eichelberg, 2024-03-07 11:36
Actions #1

Updated by Marco Eichelberg over 1 year ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100
  • Estimated time set to 2:00 h

Closed by commit #fb948a289.

Actions

Also available in: Atom PDF