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

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

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Done
    • PUP 3.7.5
    • PUP 3.8.1, PUP 4.1.0
    • Language
    • None
    • 1
    • Language 2015-04-29, Language 2015-05-13
    • 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

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Zendesk Support