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

Certain environments return "invalid byte sequence in <locale>" when parsing module PO files

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: PUP 5.3.4, PUP 5.4.0
    • Component/s: None
    • Labels:
      None
    • Release Notes:
      Bug Fix
    • Release Notes Summary:
      Puppet will no longer have difficulty parsing module translation files in non-UTF-8 environments.
    • QA Risk Assessment:
      Automate

      Description

      If you load the eputnam-i18ndemo module which has a fact that causes and error that has a Japanese translation, when its run on OSX the error is replaced by "invalid byte sequence in US-ASCII"

      xh734nh8owpuouo:~ root# puppet module install eputnam-i18ndemo
      Notice: Preparing to install into /etc/puppetlabs/code/environments/production/modules ...
      Notice: Downloading from https://forgeapi.puppet.com ...
      Notice: Installing -- do not interrupt ...
      /etc/puppetlabs/code/environments/production/modules
      └─┬ eputnam-i18ndemo (v0.2.0)
        ├── puppetlabs-stdlib (v4.21.0)
        └── puppetlabs-translate (v1.1.0)
      xh734nh8owpuouo:~ root# LANGUAGE=ja_JP puppet facts
      Error: Facter: error while resolving custom fact "i18ndemo_fact": invalid byte sequence in US-ASCII
      

      Instead of the expected Japanese string (which should look like this pattern)

              assert_match(/Error:.*eputnam-i18ndemo fact: これはeputnam-i18ndemoからのカスタムファクトからのレイズです/, result.stderr, 'missing translation for raise from ruby fact')
      

      This also appears, for example, on the Japanese Windows pooler image. If you install the module, then attempt to uninstall it, the uninstall will fail with a similar error, and a trace like the one in the comments.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                eric.delaney Eric Delaney
                Reporter:
                eric.delaney Eric Delaney
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Zendesk Support