-
Notifications
You must be signed in to change notification settings - Fork 82
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
Add ISO IR 13 and ISO IR 87 to SpecificCharacterSet #444
base: master
Are you sure you want to change the base?
Conversation
@Enet4 Hi, thanks for creating issue #443 For Japanese, Chinese or Korean, the Specific Character Set (0008,0005) may have multiple values. https://dicom.nema.org/medical/dicom/current/output/chtml/part05/sect_H.3.html In that case, the Patient Name value needs to be decoded in the Specific Character Set for each If so, I would like to fix it in this PR or another PR, could you please advise where I should consider fixing it? I am tracing the code back from the following function I guessed that the place where the values are read from the binary data is the following place, so I tried to output the values to the log here with info!
But here it is already of type Strs, so it seems that I need to understand more of the preceding code, but it is stuck here. |
>>> specification_character_set = ["shift_jis", "iso2022_jp"]
>>> "ヤマダ^タロウ".encode(specification_character_set[0]) + "=".encode("utf-8") + "山田^太郎".encode(specification_character_set[1])
b'\xd4\xcf\xc0\xde^\xc0\xdb\xb3=\x1b$B;3ED\x1b(B^\x1b$BB@O:\x1b(B' As a sample, when written in python, the Patinant Name value seems to be generated like this, so I want to be able to decode the value generated like this as |
Thank you for working on this @ikneg! Could you please add a few sample texts as unit tests? There should be some for other text encodings at the end of the module, so you would just need to follow the pattern there with new data. |
@Enet4 Thank you for your reply. I have added a test. |
Since this specification is complicated, I would like to remove it from the scope of this PR and create another PR to discuss it. |
issue #443