dcmjs-org/dcmjs

ReadBufferStream not support latine 1 on Mobile

ledinhthi opened this issue · 6 comments

Today, i got problem about this function ReadBufferStream, but when i run , i got this The "latin1" encoding is not supported,
please help me to solve this

@richard-viney please help me

@richard-viney do we have any example for conver pdf, image to dcm and send, thank you so much

I happened to run into a character set issue last week which is now fixed in this PR: #299. This change might address your problem, but without providing a failing test case it's hard to say.

If you're interested in understanding how DICOM handles image data this article might be of interest: http://dicomiseasy.blogspot.com/2012/08/chapter-12-pixel-data.html

Sorry no I haven't worked with PDF data in DICOM files yet. There are likely some resources around on how it works though.

Hi ledinhthi

Seems post 0.24.7 version of library, BufferStream.js was modified to use default textdecoding to 'latin1' and which is not supported on Mobile. Previous version of library (0.24.7 and below) its working.

Try changing new TextDecoder("latin1"); present in BufferStream.js to new TextDecoder("utf-8"); see if resolves the issues.

Thanks