Summary
VolView fails with a JSON parse error when loading a DICOM file that contains Japanese characters in Patient Name (PN).
Error:
SyntaxError: Unterminated string in JSON at position XXXX
Environment
- VolView version: HEAD (latest)
- Deployment: Web version
- OS: Windows
- Browser: Chrome (latest)
- Reproducibility: Always
Steps to Reproduce
- Prepare a DICOM file with:
- Specific Character Set:
ISO 2022 IR 87
- Patient Name (0010,0010) containing Japanese characters
- Open VolView
- Load the DICOM file
- Observe the error in the browser console
Expected Behavior
The DICOM file should load successfully, and Japanese characters in Patient Name should be handled correctly.
Actual Behavior
VolView throws the following error and fails to load the data:
SyntaxError: Unterminated string in JSON at position XXXX
Additional Notes
- If the same DICOM file is modified so that Patient Name contains only ASCII characters, the error does NOT occur.
- Removing Japanese characters from Patient Name avoids the issue.
- If the Specific Character Set tag (0008,0005) is removed and Patient Name contains only English characters, the error does NOT occur.
- The issue appears to depend solely on the DICOM content and is reproducible without any additional configuration.
Summary
VolView fails with a JSON parse error when loading a DICOM file that contains Japanese characters in Patient Name (PN).
Error:
SyntaxError: Unterminated string in JSON at position XXXXEnvironment
Steps to Reproduce
ISO 2022 IR 87Expected Behavior
The DICOM file should load successfully, and Japanese characters in Patient Name should be handled correctly.
Actual Behavior
VolView throws the following error and fails to load the data:
SyntaxError: Unterminated string in JSON at position XXXXAdditional Notes