rexcardan / Evil-DICOM

A C# DICOM Library
168 stars 98 forks source link

Fix : Characters may not render properly due to UTF8 being unexpectedly returned from `EncodingDictionary` #60

Closed Pressacco closed 5 years ago

Pressacco commented 5 years ago

BACKGROUND

When working with the Evil-DICOM library you might find that "special characters" are not rendering properly. This commit addresses the fact that the GetEncodingFromISO() method may return UTF-8 unexpectedly.

EXAMPLE

  1. calling: GetEncodingFromISO("ISO_IR_100")
  2. generated the following key: ISOIR100
  3. because ISOIR100 does not exist in the dictionary (ISO IR 100 does exist), Encoding.UTF8 was returned

RELATED ISSUES

This bug may partly explain these issues:

rexcardan commented 5 years ago

Thank you! Good catch.

Pressacco commented 5 years ago

@rexcardan If I could offer a suggestion... it would be helpful if you tagged your releases with a version number (e.g. v2.0.3) so that others can get an idea of what has changed.

For reference: