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

Interpret "" DICOM Character Set as iso-8859-1 #219

Merged
merged 1 commit into from
Nov 17, 2021

Conversation

marineotter
Copy link
Contributor

Fix #218
If there are spaces in a particular character set, they are interpreted in the same way as IR6. (Strictly speaking, this accepts data that violates the standard, but it can interpret data that meets the standard.)

@@ -40,6 +40,7 @@ const (
// htmlEncodingNames represents a mapping of DICOM charset name to golang encoding/htmlindex name. "" means
// 7bit ascii.
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you update this comment please as I don't think it applies anymore?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @suyashkumar ,
Thank you for merging this.

I considered correcting the comment, but I thought this comment didn't say anything wrong, so I left it alone.

In DICOM, "" represents 7-bit ascii (equivalent to ISO_IR 6, which is an abbreviation that I won't go into detail about).
So, I think the following comment is correct.

"" means 7bit ascii.

On the other hand, when mapping 7bit ascii (ISO_IR 6) to a golang name, it seems to use iso-8859-1.
So I think the following comment is also correct.

htmlEncodingNames represents a mapping of DICOM charset name to golang encoding/htmlindex name.

Is there something wrong with my understanding? (I don't know much about it, so I might be wrong...)

Regards

@suyashkumar
Copy link
Owner

Actually I'll get this submitted ASAP and make the comment changes later. Thanks so much for the contribution @marineotter !

@suyashkumar suyashkumar changed the title Corresponds to the omitted specific character set. Interpret "" DICOM Character Set as iso-8859-1 Nov 17, 2021
@suyashkumar suyashkumar merged commit 87c7d7e into suyashkumar:main Nov 17, 2021
suyashkumar added a commit that referenced this pull request Jun 9, 2024
* Interpret "" DICOM Character Set as iso-8859-1 (#219)

* Treat Unknown Tags with defined VL as OW (#232)

This change ensures that unknown tags with a defined VL are read as bytes (OW). This should fix #231. Previously they would have been read as strings by default.

* Initial commit to default reading VR=UN as SQ when reading with an implicit transfer syntax and undefined length

* add todo

* handle all forms of unknown data elements

* Update go version in build

* update other go build versions

---------

Co-authored-by: Yoshiyuki Harada <[email protected]>
Co-authored-by: Suyash Kumar <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot handle cases where a "Specific Character Set (0008,0005)" starts with "\".
2 participants