powered by nequal
Home » IO_SWF » Timeline » 2871

Changeset 2871 -- 2012-02-07 22:37:33

Author
よや
Comment
SJIS-win to UTF-8 converting on dump SWF 5 and earlier.

Diffs

IO_SWF/trunk/IO/SWF.php

@@ -114,9 +114,17 @@
$opts['indent'] = 0;
/* SWF Tags */
+        if ($this->_headers['Version'] < 6) {
+            ob_start('mb_convert_encoding_from_sjis');
+        }
echo 'Tags:'.PHP_EOL;
foreach ($this->_tags as $tag) {
$tag->dump($opts);
+            ob_flush();
}
}
}
+
+function mb_convert_encoding_from_sjis($a) {
+    return mb_convert_encoding($a, 'UTF-8', 'SJIS-win');
+}