Feature #468
openFlag to ignore errors during character set conversion
0%
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.
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 ...
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.
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.