Jira (PUP-6208) Invalid byte sequence in US-ASCII on gem install

2 views
Skip to first unread message

Hugo Freire (JIRA)

unread,
Apr 21, 2016, 3:46:03 AM4/21/16
to puppe...@googlegroups.com
Hugo Freire created an issue
 
Puppet / Bug PUP-6208
Invalid byte sequence in US-ASCII on gem install
Issue Type: Bug Bug
Assignee: Unassigned
Created: 2016/04/21 12:45 AM
Labels: gem
Priority: Major Major
Reporter: Hugo Freire

Using Package provider Gem to install bundler-1.2.5 results on "Invalid byte sequence in US-ASCII". The locale in my machine is correct, en_GB.UTF-8, but when the execute the gem install, puppet changes it to US-ASCII, and fails with the "Invalid byte sequence..."

I have found that puppet overrides locales in util execution, but you can skip it by setting "override_locale". I not found any way to pass this. Removing this lines works perfectly.

https://github.com/puppetlabs/puppet/blob/master/lib/puppet/util/execution.rb#L265

        if (options[:override_locale]) then
          # loop over them and clear them
          Puppet::Util::POSIX::LOCALE_ENV_VARS.each { |name| ENV.delete(name) }
          # set LANG and LC_ALL to 'C' so that the command will have consistent, predictable output
          # it's OK to manipulate these directly rather than, e.g., via "withenv", because we are in
          # a forked process.
          ENV['LANG'] = 'C'
          ENV['LC_ALL'] = 'C'
        end

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v6.4.13#64028-sha1:b7939e9)
Atlassian logo

Kylo Ginsberg (JIRA)

unread,
Apr 21, 2016, 2:08:04 PM4/21/16
to puppe...@googlegroups.com

Sean McDonald (JIRA)

unread,
May 16, 2017, 5:30:03 PM5/16/17
to puppe...@googlegroups.com
Sean McDonald updated an issue
Change By: Sean McDonald
Labels: gem i18n  triaged
This message was sent by Atlassian JIRA (v6.4.14#64029-sha1:ae256fe)
Atlassian logo

Sean McDonald (JIRA)

unread,
May 16, 2017, 5:30:03 PM5/16/17
to puppe...@googlegroups.com

Josh Cooper (JIRA)

unread,
Jun 19, 2019, 4:53:03 PM6/19/19
to puppe...@googlegroups.com
Josh Cooper commented on Bug PUP-6208
 
Re: Invalid byte sequence in US-ASCII on gem install

This is another symptom of PUP-1191. It's not clear to me if the gem provider should pass override_locale: false or if puppet shouldn't override the locale in the first place...

This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93)
Atlassian logo
Reply all
Reply to author
Forward
0 new messages