Uploaded image for project: 'Puppet'
  1. Puppet
  2. PUP-4385

Can't write WOMANS HAT emoji with \uXXXX unicode escapes

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Done
    • Affects Version/s: PUP 3.7.5
    • Fix Version/s: PUP 3.8.1, PUP 4.1.0
    • Component/s: Language
    • Labels:
      None
    • Template:
    • Epic Link:
    • Story Points:
      1
    • Sprint:
      Language 2015-04-29, Language 2015-05-13
    • Release Notes:
      Bug Fix

      Description

      Unicode includes a bunch of 5+ hex digit characters now; most notably emoji, but I think there might be some real human language characters in there too.

      Puppet's \u escape sequences don't accommodate these. The 5-digit versions get truncated, and the alternate 2x4-digit forms result in an error.

      notice("5 digit unicode \u1f452 hat") # prints: 5 digit unicode ὅ2 hat
      # notice("double 4 digit unicode \uD83D\uDC52 hat") # Results in Error: Could not parse for environment production: invalid byte sequence in UTF-8 on node magpie.lan
      notice("literal 👒 hat") # works fine
      

      Update

      The implementation allows using the escape

      \u{nnnn}
      

      where n is 1 or more hex digits.

      notice("5 digit unicode \u{1f452} hat")
      

      QA Risk Analysis

      Probability Medium (anyone using 5+ byte unicode characters)
      Impact Medium (broken Unicode support breaks puppet)
      Risk Level Medium
      Test Level Spec

        Attachments

          Activity

            jsd-sla-details-panel

              People

              • Assignee:
                erict Eric Thompson
                Reporter:
                nick.fagerlund Nicholas Fagerlund
                QA Contact:
                Kurt Wall
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: