Project

General

Profile

Bug #3884

rake does not respect LC_* vars for encoding

Added by kch (Caio Chassot) about 10 years ago. Updated over 9 years ago.

Status:
Rejected
Priority:
Normal
Assignee:
-
Target version:
-
ruby -v:
ruby 1.9.2p0 (2010-08-18 revision 29034) [universal.x86_64-darwin10.4.0]
Backport:
[ruby-core:32610]

Description

=begin
$ ruby -v
ruby 1.9.2p0 (2010-08-18 revision 29034) [universal.x86_64-darwin10.4.0]

$ export -n LC_ALL LC_CTYPE LANG
$ ruby -e "puts ENCODING"
US-ASCII

$ LC_ALL="en_US.UTF-8" ruby -e "puts ENCODING"
UTF-8

$ echo "task(:foo) { puts ENCODING }" > Rakefile
$ rake -s foo
US-ASCII

$ LC_ALL="en_US.UTF-8" rake -s foo
US-ASCII

Same for current trunk:

$ ./ruby -v
ruby 1.9.3dev (2010-09-28 trunk 29354) [universal.x64-darwin10.4.0]

$ export -n LC_ALL LC_CTYPE LANG
$ ./ruby -e "puts ENCODING"
US-ASCII

$ LC_ALL="en_US.UTF-8" ./ruby -e "puts ENCODING"
UTF-8

$ echo "task(:foo) { puts ENCODING }" > Rakefile
$ ./bin/rake -s foo
US-ASCII

$ LC_ALL="en_US.UTF-8" ./bin/rake -s foo
US-ASCII

A magic comment on the Rakefile will work, tho.
=end

Also available in: Atom PDF