Affects Version/s: 0.10.4
Fix Version/s: 12.0.0
We ran into an unexpected locale problem with chef's script resource. It turns out that the execute and script providers are setting LC_ALL to C when they shouldn't be doing this.
On our systems we have the following locale settings:
LC_ALL is blank, which is what we expect to find. LC_ALL is an override for the other locale settings, but when unset allows programs to find the locale setting appropriate to its needs - e.g. LC_COLLATE or LC_MESSAGES. More information is at http://pubs.opengroup.org/onlinepubs/7908799/xbd/envvar.html
However, if chef detects that LC_ALL is blank, then it sets it to C (POSIX). This is unnecessary and incorrect for programs expecting a UTF-8 locale. (In our case, bundle fails to install a particular gem with a UTF-8 gemspec, namely jquery-rails). Doubly confusing since the commands run fine outside of chef, since the program is choosing other LC variables as appropriate to its needs.
In summary, chef should not set LC_ALL for script and execute commands; if it is blank it should be left blank. A workaround is to explicitly set the environment variable LC_ALL on every affected script or execute resource.