Lucas_Werkmeister_WMDE added a comment.
In T324202#9410163 <https://phabricator.wikimedia.org/T324202#9410163>, @thiemowmde wrote: >> though “correct” in that the methods perform their inverse operations […] we’re just putting JSONified mojibake in the inner cache. > > The `utf8_decode` documentation says "UTF-8 characters which do not exist in ISO-8859-1 (that is, code points above U+00FF) are replaced with `?`". This operation is not reversible. I can confirm this from personal experience. But this `utf8_decode()` call is never going to see “UTF-8 characters which do not exist in ISO-8859-1”. It only ever sees results from `utf8_encode()`, which treats its input as ISO-8859-1, so the output of `utf8_encode()` only contains UTF-8 characters which do exist in ISO-8859-1. > $c = new HashBagOStuff() > $sc = new Wikibase\Lib\SimpleCacheWithBagOStuff( $c, 'prefix', 'secret' ) > $sc->set( 'key', '🤔' ); // U+1F914 > $sc->get( 'key' ) = "🤔" TASK DETAIL https://phabricator.wikimedia.org/T324202 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Lucas_Werkmeister_WMDE Cc: thiemowmde, Paladox, Michael, ItamarWMDE, Aklapper, Lucas_Werkmeister_WMDE, Danny_Benjafield_WMDE, Astuthiodit_1, malberts, karapayneWMDE, Invadibot, maantietaja, Akuckartz, darthmon_wmde, Nandana, Lahi, Gq86, GoranSMilovanovic, TK-999, QZanden, LawExplorer, _jensen, rosalieper, Scott_WUaS, Wikidata-bugs, aude, Lydia_Pintscher, Jdforrester-WMF, Mbch331
_______________________________________________ Wikidata-bugs mailing list -- [email protected] To unsubscribe send an email to [email protected]
