Skip to content

Commit dcb67ea

Browse files
committed
Use mb_convert_encoding instead of utf8_decode
1 parent 0fcad58 commit dcb67ea

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Tests/Loader/XliffFileLoaderTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,12 +88,12 @@ public function testEncoding()
8888
$loader = new XliffFileLoader();
8989
$catalogue = $loader->load(__DIR__.'/../fixtures/encoding.xlf', 'en', 'domain1');
9090

91-
$this->assertEquals(utf8_decode('föö'), $catalogue->get('bar', 'domain1'));
92-
$this->assertEquals(utf8_decode('bär'), $catalogue->get('foo', 'domain1'));
91+
$this->assertEquals(mb_convert_encoding('föö', 'ISO-8859-1', 'UTF-8'), $catalogue->get('bar', 'domain1'));
92+
$this->assertEquals(mb_convert_encoding('bär', 'ISO-8859-1', 'UTF-8'), $catalogue->get('foo', 'domain1'));
9393
$this->assertEquals(
9494
[
9595
'source' => 'foo',
96-
'notes' => [['content' => utf8_decode('bäz')]],
96+
'notes' => [['content' => mb_convert_encoding('bäz', 'ISO-8859-1', 'UTF-8')]],
9797
'id' => '1',
9898
'file' => [
9999
'original' => 'file.ext',

0 commit comments

Comments
 (0)