Uploaded image for project: 'FHIR Specification Feedback'
  1. FHIR Specification Feedback
  2. FHIR-36641

Is the maximum length of a string defined in bytes or characters?

    XMLWordPrintableJSON

Details

    • Icon: Change Request Change Request
    • Resolution: Persuasive
    • Icon: Medium Medium
    • FHIR Core (FHIR)
    • R4
    • Modeling & Methodology
    • Datatypes
    • 2.25.0.1
    • Hide

      Will update the spec as follows:

      Note that strings SHALL NOT exceed 1,048,576 (1024*1024) characters in size.  Because UTF-8 characters can be expressed with more than one byte, the string size may be more than 1MB.

      Show
      Will update the spec as follows: Note that strings SHALL NOT exceed 1,048,576 (1024*1024) characters in size.  Because UTF-8 characters can be expressed with more than one byte, the string size may be more than 1MB.
    • Lloyd McKenzie / AbdulMalik Shakir : 3-0-0
    • Clarification
    • Non-substantive
    • R5

    Description

      The maximum size of a string is defined as follows:

      Note that strings SHALL NOT exceed 1MB (1024*1024 characters) in size.

      This definition only makes sense if we assume that 1 character is 1 byte. In unicode encodings, this is typically not a safe assumption for strings.

      Therefore, I think the specification needs to clarify whether the maximum size of a string is 1024*1024 bytes (number of characters will vary depending on the encoding and the characters used) or 1024*1024 characters (maximum binary size will vary depending on the encoding and characters used)

      Attachments

        Activity

          People

            marc.duteau Marc Duteau
            slagesse Spencer LaGesse
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: