File gegl-ruby19.patch of Package gegl.4314
commit 809642a08787638d9682149de25d36ee273902ff
Author: Øvind Kolå<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(-)
---
Index: gegl-0.2.0/tools/create-reference.rb
===================================================================
--- gegl-0.2.0.orig/tools/create-reference.rb
+++ gegl-0.2.0/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
Index: gegl-0.2.0/tools/gobj2dot.rb
===================================================================
--- gegl-0.2.0.orig/tools/gobj2dot.rb
+++ gegl-0.2.0/tools/gobj2dot.rb
@@ -15,6 +15,11 @@
#
# Copyright (C) 2009 Henrik Akesson
+if RUBY_VERSION =~ /^1.9/ or RUBY_VERSION =~ /^[2345]/
+ Encoding.default_external = Encoding::UTF_8
+ Encoding.default_internal = Encoding::UTF_8
+end
+
require 'find'
if ARGV[0] == nil or ARGV.length != 1 or ARGV[0] == "-h"