[MacRuby] #849: MacRuby throws the exception of "Encoding::CompatibilityError" with various cases.
MacRuby
ruby-noreply at macosforge.org
Thu Nov 25 03:35:55 PST 2010
#849: MacRuby throws the exception of "Encoding::CompatibilityError" with various
cases.
----------------------------------+-----------------------------------------
Reporter: watson1978@… | Owner: lsansonetti@…
Type: defect | Status: new
Priority: blocker | Milestone:
Component: MacRuby | Keywords:
----------------------------------+-----------------------------------------
Comment(by watson1978@…):
MacRuby does not support Script Encoding now.[[BR]]
And can't check validity of Encoding definitely.
I think better that MacRuby does not check Encoding, till issues are
fixed.
It is very likely that the script which stopped by this issue comes to
work.
{{{
#!diff
diff --git a/string.c b/string.c
index c224d7f..407ad62 100644
--- a/string.c
+++ b/string.c
@@ -165,6 +165,11 @@ str_invert_byte_order(rb_str_t *self)
static rb_encoding_t *
str_compatible_encoding(rb_str_t *str1, rb_str_t *str2)
{
+ // TODO : #742, #849
+ // MacRuby does not support Script Encoding now.
+ // So, can't check validity of Encoding definitely.
+ return rb_encodings[ENCODING_UTF8];
+#if 0
if (str1->encoding == str2->encoding) {
return str1->encoding;
}
@@ -182,6 +187,7 @@ str_compatible_encoding(rb_str_t *str1, rb_str_t
*str2)
return str1->encoding;
}
return NULL;
+#endif
}
static rb_encoding_t *
}}}
--
Ticket URL: <http://www.macruby.org/trac/ticket/849#comment:15>
MacRuby <http://macruby.org/>
More information about the macruby-tickets
mailing list