From 534899acf620b83936a8e445c806cc481d789050 Mon Sep 17 00:00:00 2001 From: Urban Müller Date: Mon, 10 Aug 2015 13:59:59 +0200 Subject: correctly handle non-utf8 in keys --- tests/it.t | 1 + 1 file changed, 1 insertion(+) (limited to 'tests') diff --git a/tests/it.t b/tests/it.t index a50b4dc..57c8be1 100755 --- a/tests/it.t +++ b/tests/it.t @@ -389,6 +389,7 @@ is(it::any2utf8("a💚b"), "a💚b", "it::any2utf8 correctly handles 4-byte utf- is(it::any2utf8(array("foo", utf8_decode("bär"))), array("foo", "bär"), "any2utf8 on arrays"); is(it::any2utf8(array("foo", array(utf8_decode("bär")))), array("foo", array("bär")), "any2utf8 on recursive arrays"); is(it::any2utf8(array(1, true, false, null)), array(1, true, false, null), "any2utf8 should leave types alone"); +is(it::any2utf8(array(utf8_decode('Müller') => utf8_decode('Müller'))), array('Müller' => 'Müller'), "it::any2utf8 latin1 keys"); foreach (array($dummy, false, true, null, 1, "a", "Ä", "/", array()) as $var) is(it::json_decode(it::json_encode($var)), $var); -- cgit v1.2.3