Uploaded image for project: 'OASIS Open Document Format for Office Applications (OpenDocument) TC'
  1. OASIS Open Document Format for Office Applications (OpenDocument) TC
  2. OFFICE-3327

6.20.25: Unichar- Semantics for UNICODE(UNICHAR(N)) doesn't hold true for all values of N

    XMLWordPrintable

    Details

    • Proposal:
      Hide

      Change this sentence: "Evaluators should implement UNICHAR such that UNICODE(UNICHAR(N)) returns N for any N >= 0 and N <= 1114111."

      TO: "Evaluators should implement UNICHAR such that for values of N (N >= 0 and N <= 1114111) that UNICODE returns a character, UNICODE(UNICHAR(N)) returns N."

      Show
      Change this sentence: "Evaluators should implement UNICHAR such that UNICODE(UNICHAR(N)) returns N for any N >= 0 and N <= 1114111." TO: "Evaluators should implement UNICHAR such that for values of N (N >= 0 and N <= 1114111) that UNICODE returns a character, UNICODE(UNICHAR(N)) returns N."
    • Resolution:
      Hide

      1) Replace the semantics section of 6.20.25 UNICHAR

      "Semantics: Returns the character represented by the given numeric value. Evaluators shall support
      values between 1 and 0xFFFF, which is the maximum possible value in UCS-2 encoding using two
      octets. Evaluators should allow N to be any legal character value in [UNICODE] assuming UCS-4
      encoding. Evaluators should implement UNICHAR such that UNICODE(UNICHAR(N)) returns N for
      any N >= 0 and N <= 1114111."

      with

      "Semantics: Returns the character having the given numeric value as [UNICODE] code point.
      Evaluators shall support values between 1 and 0xFFFF. Evaluators should allow N to be any [UNICODE] code point of type Graphic, Format or Control. Evaluators should implement UNICHAR such that UNICODE(UNICHAR(N)) returns N for any [UNICODE] code point N of type Graphic, Format or Control."

      2) Delete the Note:

      "Note: Depending on the evaluator's encoding the string returned may be actually longer than
      expected, for example in UTF-8 or UTF-16 encodings."

      3) In the Summary, insert the word "the" to read:

      "Return the character represented by ..."

      Show
      1) Replace the semantics section of 6.20.25 UNICHAR "Semantics: Returns the character represented by the given numeric value. Evaluators shall support values between 1 and 0xFFFF, which is the maximum possible value in UCS-2 encoding using two octets. Evaluators should allow N to be any legal character value in [UNICODE] assuming UCS-4 encoding. Evaluators should implement UNICHAR such that UNICODE(UNICHAR(N)) returns N for any N >= 0 and N <= 1114111." with "Semantics: Returns the character having the given numeric value as [UNICODE] code point. Evaluators shall support values between 1 and 0xFFFF. Evaluators should allow N to be any [UNICODE] code point of type Graphic, Format or Control. Evaluators should implement UNICHAR such that UNICODE(UNICHAR(N)) returns N for any [UNICODE] code point N of type Graphic, Format or Control." 2) Delete the Note: "Note: Depending on the evaluator's encoding the string returned may be actually longer than expected, for example in UTF-8 or UTF-16 encodings." 3) In the Summary, insert the word "the" to read: "Return the character represented by ..."

      Description

      Section 6.20.25 Spec says:UNICODE(UNICHAR(N)) returns N for any N >=0 and N<= 1114111

      Some values of N (55296 for example) are non-characters and UNICHAR should return an error, which should be propagated to UNICODE.

        Attachments

          Activity

            People

            • Assignee:
              aguelzow Andreas Guelzow (Inactive)
              Reporter:
              ericpa Eric Patterson (Inactive)
            • Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: