Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specific character set doesn't not comply with standards #1624

Closed
deksan opened this issue Jul 6, 2023 · 1 comment · Fixed by #1625
Closed

Specific character set doesn't not comply with standards #1624

deksan opened this issue Jul 6, 2023 · 1 comment · Fixed by #1625
Labels

Comments

@deksan
Copy link

deksan commented Jul 6, 2023

Describe the bug
DicomEncoding.GetCharset returns ISO IR 192 for utf-8 and should instead return ISO_IR 192.

To Reproduce
I send a dataset after setting the DicomTag.SpecificCharset :

var ds = new DicomDataset();
var encoding = Encoding.GetEncoding(CustomEncoding);
var charset = DicomEncoding.GetCharset(encoding);
ds.AddOrUpdate(DicomTag.SpecificCharacterSet, charset);

The resulting encoding is ISO IR 192 instead of ISO_IR 192 in the dataset.

Expected behavior
We should have ISO_IR 192 isntead

Environment
Fellow Oak DICOM version: 5.1.1
OS: Windows 11 x64
Platform: .NET Framework 4.6.2

@deksan deksan added the new label Jul 6, 2023
@mrbean-bremen mrbean-bremen added bug and removed new labels Jul 6, 2023
@mrbean-bremen
Copy link
Collaborator

Thank you - that is indeed a bug in GetCharset that I may have introduced some time ago.

mrbean-bremen added a commit to mrbean-bremen/fo-dicom that referenced this issue Jul 6, 2023
* single value encodings have been returned as
  "ISO IR ###" instead of "ISO_IR ###"
* Tolerate Specific Character Set values misspelled
  as "ISO-IR ###" additionally to "ISO IR ###"
* fixes fo-dicom#1624
mrbean-bremen added a commit to mrbean-bremen/fo-dicom that referenced this issue Jul 10, 2023
* single value encodings have been returned as
  "ISO IR ###" instead of "ISO_IR ###"
* Tolerate Specific Character Set values misspelled
  as "ISO-IR ###" additionally to "ISO IR ###"
* fixes fo-dicom#1624
gofal pushed a commit that referenced this issue Jul 13, 2023
* single value encodings have been returned as
  "ISO IR ###" instead of "ISO_IR ###"
* Tolerate Specific Character Set values misspelled
  as "ISO-IR ###" additionally to "ISO IR ###"
* fixes #1624

Co-authored-by: Alexander Moerman <alexander.moerman@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants