Project

General

Profile

Actions

Feature #468

open

Flag to ignore errors during character set conversion

Added by Michael Onken over 12 years ago. Updated over 12 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Library
Target version:
-
Start date:
2012-12-18
Due date:
% Done:

0%

Estimated time:
5:00 h
Module:
dcmdata
Operating System:
Compiler:

Description

So far, convertToUTF8() and related functions stop after first error. However, it might be interesting to continue if a single string could not be converted. This should be a common use case, e.g. if users like to import some attribute values of a DICOM import dataset into a database in UTF-8.

Actions #1

Updated by Jörg Riesmeier over 12 years ago

This feature request should mainly apply to DICOMDIR objects/files, where the SpecificCharacterSet attribute is contained in each individual DirectoryRecord (item). But please, don't introduce another ugly OFGlobal variable ...

Actions #2

Updated by Jörg Riesmeier over 12 years ago

  • Category set to Library
Actions #3

Updated by Michael Onken over 12 years ago

Hm, why not make it possible to skip any conversion errors (if desired) and convert as much as possible, also in a normal dataset and not only in DICOMDIR? However, in DICOMDIR the issue is most obvious, and was the original reason for the request.

Actions #4

Updated by Jörg Riesmeier over 12 years ago

I don't think that a half-converted DICOM dataset is what would be desired by any DCMTK user. Please remember that the SpecificCharacterSet specifies the character set for the entire dataset! With the exception of a DICOMDIR, of course.

Please also note that a conversion usually does not fail if the converter is configured appropriately and the input dataset is encoded correctly. There are also "nice" conversion options when mapping characters to a character set with less items ...

As far as I understood, you mentioned that the DICOMDIR is a special case since you can ignore certain record (e.g. during import) if conversion fails.

Anyway, IMHO, the return code should warn the user if the conversion could not be completed successfully.

Actions

Also available in: Atom PDF