Excerpts from Giorgio Lando's message of Wed Jan 09 16:39:10 -0800 2008:
> I am not a mac user, but it works fine for me!

I think I've found a better way, although it introduces yet another
dependency, to the 'gettext' gem. I'd be interested to see if this works
for you, Giorgio, and also for anyone who's running Sup under Cygwin or
OS X. This is an approach I feel a lot better about.

diff --git a/Rakefile b/Rakefile
index 2f2b992..d4060c1 100644
--- a/Rakefile
+++ b/Rakefile
@@ -17,7 +17,7 @@ Hoe.new('sup', Redwood::VERSION) do |p|
   p.url = p.paragraphs_of('README.txt', 0).first.split(/\n/)[2].gsub(/^\s+/, 
"")
   p.changes = p.paragraphs_of('History.txt', 0..0).join("\n\n")
   p.email = "[EMAIL PROTECTED]"
-  p.extra_deps = [['ferret', '>= 0.10.13'], ['ncurses', '>= 0.9.1'], ['rmail', 
'>= 0.17'], 'highline', 'net-ssh', ['trollop', '>= 1.7'], 'lockfile', 
'mime-types']
+  p.extra_deps = [['ferret', '>= 0.10.13'], ['ncurses', '>= 0.9.1'], ['rmail', 
'>= 0.17'], 'highline', 'net-ssh', ['trollop', '>= 1.7'], 'lockfile', 
'mime-types', 'gettext']
 end
 
 rule 'ss?.png' => 'ss?-small.png' do |t|
diff --git a/lib/sup.rb b/lib/sup.rb
index 5bb27ba..064e0af 100644
--- a/lib/sup.rb
+++ b/lib/sup.rb
@@ -3,6 +3,7 @@ require 'yaml'
 require 'zlib'
 require 'thread'
 require 'fileutils'
+require 'gettext'
 require 'curses'
 
 class Object
@@ -225,9 +226,8 @@ module Redwood
   module_function :log
 end
 
-## determine encoding and character set. there MUST be a better way to
-## do this.
-  $encoding = `locale -c LC_CTYPE|head -6|tail -1`.chomp
+## determine encoding and character set
+  $encoding = Locale.current.charset
   if $encoding
     Redwood::log "using character set encoding #{$encoding.inspect}"
   else
-- 
1.5.4.rc2.60.gb2e62-dirty


-- 
William <[EMAIL PROTECTED]>
_______________________________________________
sup-talk mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/sup-talk

Reply via email to