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
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions pkg/charset/charset.go
Original file line number Diff line number Diff line change
Expand Up @@ -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

var htmlEncodingNames = map[string]string{
"": "iso-8859-1",
"ISO_IR 6": "iso-8859-1",
"ISO 2022 IR 6": "iso-8859-1",
"ISO_IR 13": "shift_jis",
Expand Down