[gegl] tools/create-reference.rb: fix utf8 handling for ruby >= 1.9.x



commit 809642a08787638d9682149de25d36ee273902ff
Author: Ãyvind KolÃs <pippin gimp org>
Date:   Thu Apr 5 18:49:54 2012 +0200

    tools/create-reference.rb: fix utf8 handling for ruby >= 1.9.x
    
    A patch from Tim Mooney, fixing bug #673523

 tools/create-reference.rb |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/tools/create-reference.rb b/tools/create-reference.rb
index d0bb96c..bb440ca 100755
--- a/tools/create-reference.rb
+++ b/tools/create-reference.rb
@@ -5,6 +5,11 @@
 # Use under a public domain license.
 #
 
+if RUBY_VERSION =~ /^1.9/ or RUBY_VERSION =~ /^[2345]/
+  Encoding.default_external = Encoding::UTF_8
+  Encoding.default_internal = Encoding::UTF_8
+end
+
 class Argument
     attr_accessor :name, :data_type, :doc
     def initialize



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]