On 11 October 2013 23:34, Erik Dalén <[email protected]> wrote:
> > > > On 11 October 2013 23:03, Andy Parker <[email protected]> wrote: > >> On Fri, Oct 11, 2013 at 1:38 PM, Jos Backus <[email protected]> wrote: >> >>> >>> >>> On Friday, October 11, 2013 12:54:00 PM UTC-7, Erik Dalén wrote: >>>> >>>> What is the locale setting here? Is it C or a UTF-8 locale? >>>> >>> >>> In my setup (CentOS 6.3), 'locale' says POSIX. One "fix" is to set >>> LANG=en_US.UTF-8 in the environment. >>> >>>> >>>> If it is C it is really a rpm bug, but Puppet should probably handle >>>> those as well. >>>> >>> >> How would puppet be able to figure this out? We set the locale to C >> (puppet does that when it executes commands) and then we got UTF-8 text. We >> could scan the output and guess about the encoding, but there are plenty of >> cases where that will go wrong. >> > > Don't know really. Probably just fallback to UTF-8 if locale is C and text > contains non ASCII characters. If it is invalid UTF-8 I guess it would have > to bail out like this. > > But I mean as it is a RPM bug Puppet basically has to work around it or > reimplement the parts of RPM it needs to read package lists itself. > > I checked this a bit further, and it seems like the policy is to always have UTF-8 encoding in RPM descriptions etc, but that RPM will happily build packages with text in other encodings. But it seems like a decent workaround to force encoding here as RPM seems to print the original text out to the console without any charset translation to the system locale. -- Erik Dalén -- You received this message because you are subscribed to the Google Groups "Puppet Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/puppet-dev. For more options, visit https://groups.google.com/groups/opt_out.
