Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Unknown
-
Resolution: Unresolved
-
Affects Version/s: 10.12.0
-
Fix Version/s: None
-
Component/s: Chef Client
-
Labels:None
-
Environment:
AMI AWS; 624MB; debian squeeze; chef 10.12.0;
Description
When trying to use a template with others characters than US-ASCII (aka UTF-8), chef-client throw:
ArgumentError: invalid byte sequence in US-ASCII
/usr/local/lib/ruby/gems/1.9.1/gems/chef-10.12.0/lib/chef/mixin/template.rb:74:in `split'
/usr/local/lib/ruby/gems/1.9.1/gems/chef-10.12.0/lib/chef/mixin/template.rb:74:in `source_listing'
...
Setting Encoding.default_external = Encoding::UTF_8 if RUBY_VERSION > "1.9" on the recipe makes the template to be renderize correctly. It don't have effect to use # encoding: utf-8 on the first line of the recipe or the template file.
Apparently chef sets the locale to LC_ALL="C".