# Load dicom path in unicode

**URL:** <https://discourse.slicer.org/t/load-dicom-path-in-unicode/7365>\
**Category:** Development\
**Tags:** dicom\
**Created:** [July 1, 2019, 9:07am UTC](https://discourse.slicer.org/t/load-dicom-path-in-unicode/7365 "2019-07-01T09:07:39Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mr.wyr](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/mr.wyr/32/3347_2.png) [@Mr.wyr](https://discourse.slicer.org/u/Mr.wyr)\
**Post date:** [July 1, 2019, 9:07am UTC](https://discourse.slicer.org/t/load-dicom-path-in-unicode/7365/1 "2019-07-01T09:07:39Z")

</div>

i want to load dicom in chinese path, i change CTK source code,and set python defaultencoding to utf-8, now import chinese path is ok, examine is ok, but when click load button,some error:  
Loading with imageIOName: GDCM  
vtkITKArchetypeImageSeriesReader::ExecuteInformation: Archetype file C:/Users/Dell/Desktop/e3d/数据CT/测试/IMG00282.dcm does not existAlgorithm vtkITKArchetypeImageSeriesScalarReader(000002024FFFD6A0) returned failure for request: vtkInformation (0000020255ECBE20)  
Debug: Off  
Modified Time: 339515  
Reference Count: 1  
Registered Events: (none)  
Request: REQUEST\_INFORMATION  
FORWARD\_DIRECTION: 0  
ALGORITHM\_AFTER\_FORWARD: 1

Could not read scalar volume using GDCM approach. Error is: FileNotFoundError  
Loading with imageIOName: DCMTK  
vtkITKArchetypeImageSeriesReader::ExecuteInformation: Archetype file C:/Users/Dell/Desktop/e3d/数据CT/测试/IMG00282.dcm does not existAlgorithm vtkITKArchetypeImageSeriesScalarReader(000002024FFF6000) returned failure for request: vtkInformation (000002025EEA2080)  
Debug: Off  
Modified Time: 339605  
Reference Count: 1  
Registered Events: (none)  
Request: REQUEST\_INFORMATION  
FORWARD\_DIRECTION: 0  
ALGORITHM\_AFTER\_FORWARD: 1

Could not read scalar volume using DCMTK approach. Error is: FileNotFoundError

???:3: Body 1.0 CE???Scalar Volume

i found error in DICOMScalarVolumePlugin.py function loadFilesWithSeriesReader(self, imageIOName, files, name), so i print the files[0]:  
C:/Users/Dell/Desktop/e3d/êy?YCT/2aê?/IMG00282.dcm  
i don’t know what this is,  
but i print DICOMWidgets.py function getFileListsForRole(self, uidArgument, role) the return fileLists, it’s get CTK dicomdatabase result,the path is:  
u’C:/Users/Dell/Desktop/e3d/\u6570\u636eCT/\u6d4b\u8bd5/IMG00001.dcm’  
it’s unicode  
how can i do

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [July 1, 2019, 12:46pm UTC](https://discourse.slicer.org/t/load-dicom-path-in-unicode/7365/2 "2019-07-01T12:46:50Z")

</div>

Latin1 encoding is assumed at a number of places in CTK and Slicer. Therefore, currently you can only load data from paths that only contain characters in the Latin1 character set. We would like to improve unicode support of Slicer, so if you can fix the problem then we welcome a pull request.

---

<div class="post-metadata">

**Author:** ![Chris\_Rorden](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/chris_rorden/32/4073_2.png) [@Chris\_Rorden](https://discourse.slicer.org/u/Chris_Rorden)\
**Post date:** [August 22, 2019, 9:41pm UTC](https://discourse.slicer.org/t/load-dicom-path-in-unicode/7365/3 "2019-08-22T21:41:10Z")

</div>

@[ljod](https://discourse.slicer.org/u/ljod) perhaps your Dcm2niixGUI module could be extended to support this. Consider a folder containing DICOMs named “/home/chris//数据MR测试/4\_me\_数据MR测试”. In my testing dcm2niix will process this when run directly from the command line, but when this is set as the input directory in the Slicer Dcm2niixGUI module pressing apply shows the “Running…” option forever (while the same files in “/home/chris/MR/4\_me\_MR” load just fine.
