Issue #11303 has been updated by Jeff McCune.

Status changed from Accepted to Closed

# Closed - Not a Bug #

After some more investigation into this problem, Puppet is currently behaving 
as expected and this isn't actually a bug or 1.9 incompatibility.  We haven't 
yet made the decision to switch the entire system to UTF-8.  As a result, 
Puppet will honor whatever encoding your environment specifies with the LANG or 
LC_CTYPE environment variables.  If you do not set these environment variables 
to match the encoding format of your Puppet manifests the parser validation 
error is expected because Puppet will default to expecting ASCII encoding.

# Work Around #

Please make sure you set LC_CTYPE or LANG to the encoding you're using in your 
puppet manifests.  For parser validation, a wrapper script will help and can 
ensure your encodings match up to what you expect.  Also of note, UTF-8 is 
backwards compatibile with ASCII so you may simply want to set UTF-8 in your 
environment.

-Jeff
----------------------------------------
Bug #11303: Puppet should support UTF-8 comments in manifests
https://projects.puppetlabs.com/issues/11303

Author: Jeff McCune
Status: Closed
Priority: Normal
Assignee: Jeff McCune
Category: utf8
Target version: 2.7.9
Affected Puppet version: 2.7.6
Keywords: utf8 comment manifest internationalization paying support
Branch: 


# Overview #

Upon investigating #10291 I realize that ticket describes two separate issues.  
The UTF-8 non breaking space issue will remain in that ticket.  The unicode 
character in comments issue will be tracked in this ticket.

The issue is that Puppet 2.7.6 with Ruby 1.9.2 _and_ unset LANG and LC_CTYPE 
environment variables will default to an encoding of ASCII-8BIT.  This 
environment produces an error when parsing a manifest that contains UTF-8 
characters in a comment.

<pre>
$ cat test.pp 
class test { 
# sysadmin´s 
} 

$ od -c test.pp 
0000000 c l a s s t e s t { \n 
0000020 # s y s a d m i n 302 264 s \n } 
0000040 \n 
0000041 

$ echo $LANG 
en_US.UTF-8
$ puppet parser validate test.pp 
$ unset LANG 
$ puppet parser validate test.pp 
err: Could not parse for environment production: invalid byte sequence in 
US-ASCII at /tmp/test.pp:1 
err: Try 'puppet help parser validate' for usage
</pre>



-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-bugs?hl=en.

Reply via email to