The attached patch changes string_rep_compatible so that when called
with utf8_encoding and iso_8859_1_encoding returns utf8. Looks that this
solves the problem and breaks nothing.

Index: src/string.c
===================================================================
--- src/string.c	(revisión: 28527)
+++ src/string.c	(copia de trabajo)
@@ -397,7 +397,8 @@
 
     /* a table could possibly simplify the logic */
     if (a->encoding == Parrot_utf8_encoding_ptr &&
-            b->charset == Parrot_ascii_charset_ptr) {
+            (b->charset == Parrot_ascii_charset_ptr ||
+             b->charset == Parrot_iso_8859_1_charset_ptr)) {
         if (a->strlen == a->bufused) {
             *e = Parrot_fixed_8_encoding_ptr;
             return Parrot_ascii_charset_ptr;
@@ -406,7 +407,8 @@
         return a->charset;
     }
     if (b->encoding == Parrot_utf8_encoding_ptr &&
-            a->charset == Parrot_ascii_charset_ptr) {
+            (a->charset == Parrot_ascii_charset_ptr ||
+             a->charset == Parrot_iso_8859_1_charset_ptr)) {
         if (b->strlen == b->bufused) {
             *e = Parrot_fixed_8_encoding_ptr;
             return a->charset;

Reply via email to