Remove utf8 encode / decode

For old mysql versions utf8 encode decode was required to avoid
that math characters get messed up. This problem does not occur
with MariaDB 10.2. As now data is stored and retrieved as binary
by default, the data is returned in the same way as it is written.

Bug: T324173
Change-Id: Id29c9a8614156ff8170bc3148f2498b32c70fd8a
(cherry picked from commit 804c026a61)
This commit is contained in:
Moritz Schubotz (physikerwelt) 2023-10-22 07:41:56 +02:00 committed by Umherirrender
parent d653d6ad84
commit b47f2f004c

View file

@ -266,7 +266,7 @@ abstract class MathRenderer {
$this->inputHash = $rpage->math_inputhash; // MUST NOT BE NULL
$this->md5 = self::dbHash2md5( $this->inputHash );
if ( !empty( $rpage->math_mathml ) ) {
$this->mathml = utf8_decode( $rpage->math_mathml );
$this->mathml = $rpage->math_mathml;
}
if ( !empty( $rpage->math_inputtex ) ) {
// in the current database the field is probably not set.
@ -345,7 +345,7 @@ abstract class MathRenderer {
protected function dbOutArray() {
$out = [
'math_inputhash' => $this->getInputHash(),
'math_mathml' => utf8_encode( $this->mathml ),
'math_mathml' => $this->mathml,
'math_inputtex' => $this->userInputTex,
'math_tex' => $this->tex,
'math_svg' => $this->svg