Lucas_Werkmeister_WMDE added a comment.

  > I’m pretty sure this use of the functions is pointless (though “correct” in 
that the methods perform their inverse operations). MediaWiki sets 
`mb_internal_encoding( 'UTF-8' );` early in `Setup.php` (since T137509 
<>), so there is no reason to assume 
that PHP `serialize()` returns Latin 1 that needs to be UTF-8 encoded before 
being passed into `json_encode()` – we’re just putting JSONified mojibake in 
the inner cache.
  It turns out that the class has a test 
(`SimpleCacheTestCase::testBinaryData()`, inherited from an upstream library) 
that asserts that binary data can be stored in the cache and retrieved 
correctly; this breaks if the `utf8_encode()` is removed. However, I see no 
reason for us to support this (we only put text into the cache, not binary 
data), so I think we should just skip the test.



To: Lucas_Werkmeister_WMDE
Cc: Jdforrester-WMF, WMDE-leszek, thiemowmde, Paladox, Michael, ItamarWMDE, 
Aklapper, Lucas_Werkmeister_WMDE, Danny_Benjafield_WMDE, Isabelladantes1983, 
Themindcoder, Adamm71, S8321414, Jersione, Hellket777, LisafBia6531, 
Astuthiodit_1, malberts, 786, Biggs657, karapayneWMDE, Invadibot, maantietaja, 
Juan90264, Alter-paule, Beast1978, Un1tY, Akuckartz, Hook696, darthmon_wmde, 
Kent7301, joker88john, CucyNoiD, Nandana, Gaboe420, Giuliamocci, Cpaulf30, 
Lahi, Gq86, Af420, Bsandipan, GoranSMilovanovic, TK-999, QZanden, KimKelting, 
LawExplorer, Lewizho99, Maathavan, _jensen, rosalieper, Neuronton, Scott_WUaS, 
Wikidata-bugs, aude, Lydia_Pintscher, Mbch331
Wikidata-bugs mailing list --
To unsubscribe send an email to

Reply via email to