suyashkumar/dicom

ParseSpecificCharacterSet: Unknown character set ''. Assuming utf-8 #189

favadi opened this issue · 2 comments

Steps to reproduce:

  • acquire a DICOM file with empty SpecificCharacterSet value. This is what it looks like when examined with dcmdump command
    dcmdump sample.dcm | grep -i SpecificCharacterSet
    (0008,0005) CS (no value available)                     #   0, 0 SpecificCharacterSet
    
  • try to parse the file with dicom.ParseFile, could be reproduce with following file.
    func TestEmptySpecificCharacterSet(t *testing.T) {
    	const testFile = "./sample.dcm"
    	_, err := dicom.ParseFile(testFile, nil)
    	if err != nil {
    		t.Fatal(err)
    	}
    }
    

Expected behavior:

  • test passed

Actual behavior:

  • test failed with following error

ParseSpecificCharacterSet: Unknown character set ''. Assuming utf-8

I think it should be fixed with #219.

I confirm that the issue is fixed after #219 merged.