Skip to content

Error loading DICOM with Japanese Patient Name (ISO 2022 IR 87): JSON parse error #841

@mitsuki60

Description

@mitsuki60

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

  1. Prepare a DICOM file with:
    • Specific Character Set: ISO 2022 IR 87
    • Patient Name (0010,0010) containing Japanese characters
  2. Open VolView
  3. Load the DICOM file
  4. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions