dcmjs-org / dcmjs

Javascript implementation of DICOM manipulation
https://dcmjs.netlify.com/
MIT License
292 stars 111 forks source link

[Question] Dataset in different language #284

Closed donghakang closed 2 years ago

donghakang commented 2 years ago

Hi,

I love your work, but I have some issues when I face dataset with different language (mostly Korean). In pydicom, the data reads perfectly fine in Korean but in dcmjs I get broken data (looks like Çã³²µµ)

Do you have any suggestions for me to try? I am just curious to know how you guess actually fetch data from DICOM.

pieper commented 2 years ago

Thanks for reporting - I don't personally have a lot of experience with non-ascii datasets but it would be great if dcmjs could be as compliant as possible with the standard. If you have publicly sharable example data that would be appreciated. Ideally examples that work on pydicom or other toolkits but don't work correctly with dcmjs so we can use them for regression testing.

Ouwen commented 2 years ago

@donghakang

Likely related to this code https://github.com/dcmjs-org/dcmjs/blob/a0a0fd59cd67890f182b9dc1bb73609f7822b5d2/src/BufferStream.js#L235

Is your string utf-8 encoded?

Related #92

donghakang commented 2 years ago

Thanks @pieper I would love to send you some examples, because this data is strictly protected ;(

However, with some information for @Ouwen I think I found some problem, which I don't think is related to dcmjs .. So I will close this issue.

P.S. If anyone is struggling with broken text with different languages (such as Chinese, Japanese, Korean..) try to encode and decode the text