Contribution - Use default encoding when specific character set value is invalid

Hi,

I’m presenting a potential contribution. The patch is attached.

Currently, Orthanc defaults to ASCII encoding when the specific character set value is invalid. We have encountered health systems which have invalid specific character set values but the encoding is UTF-8 (ISO_IR 192). The patch changes the behavior such that Orthanc will use the DefaultEncoding parameter from the configuration file. This provides the flexibility needed to handle such scenarios.

I understand that the patch is a backwards-incompatible change. Perhaps another configuration parameter is needed to specify if this is the desired behavior in order to maintain backwards-compatibility.

As a new member to this group, I have the following questions:

  1. Is there a reason for the ASCII default when the specific character set value is invalid?
  2. Do any of the appropriate reviewers find this flexibility valuable? It would enable Orthanc at health systems with this predicament.
  3. Are there other suggestions for backwards-compatibility that are more idiomatic for this codebase?
    Regards,

Tristan

contribution.patch (1.67 KB)

Hi Tristan,

I just want to acknowledge that we’ve received your contribution and want to thank you for that !

As you mention, it might break backward compatibility so we need to analyse this quite in details.
We’re quite busy with the 1.7.0 release and we’ll probably look at this change a bit later.

Best regards,

Alain.

Hi Alain,

Congratulations on getting 1.7.0 out the door. I look forward to checking out the enhancements.

Have you or your team had a chance to consider the contribution?

Regards,
Tristan

Dear Tristan,

Sorry for the delay, we are still extremely busy until the beginning of July.

Be sure that we appreciate your contribution, and that we’ll carefully review it as soon as possible.

Kind Regards,
Sébastien-

Dear Tristan,

Sorry for the delay. In order to better understand your proposal and to work on our test suite, please could you provide us with sample DICOM files?

Regards,
Sébastien-

Hi Sébastien,

Sure, I will attempt to recreate the problem we saw without using the health system data and provide spoof DICOM files (compliance). It may be a while before I have the bandwidth for this but will get it to you as soon as possible.

Regards,
Tristan