dcmjs icon indicating copy to clipboard operation
dcmjs copied to clipboard

ReadBufferStream not support latine 1 on Mobile

Open ledinhthi opened this issue 3 years ago • 7 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

ledinhthi avatar Jul 29 '22 08:07 ledinhthi

@richard-viney please help me

ledinhthi avatar Jul 29 '22 09:07 ledinhthi

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

ledinhthi avatar Jul 29 '22 17:07 ledinhthi

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

richard-viney avatar Jul 30 '22 09:07 richard-viney

Hi @richard-viney Do you have any example about the convert pdf (image) to dcm, i would be appreciated that. Thank you so much!!

ledinhthi avatar Jul 31 '22 11:07 ledinhthi

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

richard-viney avatar Jul 31 '22 21:07 richard-viney

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

niraj22384 avatar May 19 '23 11:05 niraj22384