Ruby on Windows now stores environment variables and values as UTF-8, see https://bugs.ruby-lang.org/issues/9715#note-8 so we should be able to remove the various monkey patches and workarounds in puppet.
Ruby on Windows now stores environment variables and values as UTF-8, see [https://bugs.ruby-lang.org/issues/9715#note-8] so we should be able to remove the various monkey patches and workarounds in puppet, such as {{Puppet::Util.get_env}}
Ruby on Windows now stores environment variables and values as UTF-8, see [https://bugs.ruby-lang.org/issues/9715#note-8] so we should be able to remove the various monkey patches and workarounds in puppet, such as {{Puppet::Util.get_env}}
Puppet should be able to: * manage registry entries with non-ascii characters * manage users with umlat, C:\Users\John
* execute process with non-ascii in the command line
Ruby on Windows now stores environment variables and values as UTF-8, see [https://bugs.ruby-lang.org/issues/9715#note-8] so we should be able to remove the various monkey patches and workarounds in puppet, such as {{Puppet::Util.get_env}}
Puppet should be able to: * manage registry entries with non-ascii characters
* manage users with umlat, C:\Users\JohnJöhn
* execute process with non-ascii in the command line as a non-ascii user
Ruby on Windows now stores environment variables and values as UTF-8, see [https://bugs.ruby-lang.org/issues/9715#note-8] so we should be able to remove the various monkey patches and workarounds in puppet, such as {{Puppet::Util.get_env}}
Puppet should be able to: * manage registry entries with non-ascii characters
* manage users with umlat, C:\Users\Jöhn
* execute process with non-ascii in the command line as a non-ascii user
Using the various monkey patches and workarounds in latest puppet-agent and runtime with the default external encoding set to "locale", such as modify {{Puppet::Util.get_env}}
Puppet should be able to: * manage registry entries with non-ascii characters
* manage users with umlat, C:\Users\Jöhn
* execute process with non-ascii in {{clear_environment}} and {{set_env}} to no longer special case Windows and just delegate to Ruby's {{ENV}}. Then try to reproduce the command line as a non-ascii user
* get/set environment variables with rune characters: [ issue described inhttps://bugs.ruby-lang.org/issuesprojects/8822#noteruby-6]
AndEnvironment names should be case insensitive. {code:puppet} exec { 'tomcat-configure-service': command => "powershellEnvironment values should be case preserving.exe Get-ChildItem Env:", onlyif => 'powershellIt should be possible to get/set environment values using characters that are valid for the current locale, e.exe exit 0'g. if chcp is set to CP1252, provider => windows, it should be possible to store extended ascii characters as values like Á logoutput => true, #notify => $tomcat_serviceAlso related, tag => 'tomcat-configure-service' if the current user profile contains extended ascii, then it should be possible to do: } {code}
{noformat}
set USERNAME=Jöhn set USERPROFILE=C:\Users\Jöhn C:\> puppet apply manifests\bug_swedish_userprofile.pp --test {noformat}
Using the latest puppet-agent and runtime with the default external encoding set to "locale", modify {{get_env}}, {{clear_environment}} and {{set_env}} to no longer special case Windows and just delegate to Ruby's {{ENV}}. Then try to reproduce the issue described in https://bugs.ruby-lang.org/projectsissues/ruby9715#note-master/activity?from=2016-06-228 to see that environment values can be set & get correctly.
Environment names should be case insensitive.
Environment values should be case preserving.
It should be possible to get/set environment values using characters that are valid for the current locale, e.g. if chcp is set to CP1252, it should be possible to store extended ascii characters as values like Á
Also related, if the current user profile contains extended ascii, then it should be possible to do:
{noformat}
set USERNAME=Jöhn set USERPROFILE=C:\Users\Jöhn C:\> puppet apply manifests\bug_swedish_userprofile.pp --test {noformat}
Verified external encoding is set to the locale encoding, in this case CP932/Shift-JIS. And ruby can retrieve an environment, transcoding its value from CP932 to UTF-8:
C:\>type encodings.rb
%w[external internal locale filesystem].each do |name|
The Puppet::Util methods for getting, setting, clearing and merging environment variables are still available, but are deprecated and will be removed in the next major release. Puppet 8 now uses Ruby's builtin ENV class to manage environment variables on Windows.