On 2016-08-01 14:23, Tiago Delboni wrote:
> Hi!
>
> On Windows 7 we have Puppet 4.2.x and, in order to deal with accented
> characters commonly found in registry key DisplayName, we use unicode
> escape sequences in our manifests such as "\u00FA".
>
> However, on Windows XP, we couldn't install Puppet 4.2.x so we use
> 3.8.x instead. When running the same manifest with escape sequences,
> Puppet complains: "Unrecognised escape sequence '\u' in file ...".
>
Have you tried using 3.8.x with parser=future turned on? That would give
you support for \u the same way as in puppet 4.x.
> Puppet 3.8.x documentation states that it "treats strings as sequences
> of bytes. It does not recognize encodings or translate between them, and
> non-printing characters are preserved."
>
Yes, when you get the waring for \u, it means there will be a literal
backslash and a literal u in the resulting string. (That is with the
regular parser since it (as it says) does not support the \u escape for
unicode chars).
> So, how can I deal with software that have accented characters in their
> DisplayName? Assuming that registry's encoding is the same on WXP and
> W7, I could probably make it work by using Puppet 4.2.x on Windows XP,
> but I just don't know how to install it successfully.
>
Use puppet 3.8.x (latest) as noted above. The other approach (ugly, and
horrible work around) is to simply copy/paste the actual character into
the source file, but that is not guaranteed to work for all characters.
Hope that helps
- henrik
> --
> You received this message because you are subscribed to the Google
> Groups "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to
puppet-users...@googlegroups.com
> <mailto:
puppet-users...@googlegroups.com>.
> To view this discussion on the web visit
>
https://groups.google.com/d/msgid/puppet-users/12713369-5970-4a43-804a-ca57a400afd0%40googlegroups.com
> <
https://groups.google.com/d/msgid/puppet-users/12713369-5970-4a43-804a-ca57a400afd0%40googlegroups..com?utm_medium=email&utm_source=footer>.
> For more options, visit
https://groups.google.com/d/optout.
--
Visit my Blog "Puppet on the Edge"
http://puppet-on-the-edge.blogspot.se/