Skip to content

Commit 83ddf98

Browse files
committed
fix: resolve iconv error by switching to mb
1 parent aa6d3ec commit 83ddf98

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@
2424
],
2525
"require": {
2626
"php": ">=7.2.0",
27-
"ext-iconv": "*"
27+
"ext-iconv": "*",
28+
"ext-mbstring": "*"
2829
},
2930
"require-dev": {
3031
"codacy/coverage": "^1.4.3",

src/Parsing/ParserState.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ public function parseCharacter($bIsForIdentifier)
221221
$sUtf32 .= \chr($iUnicode & 0xff);
222222
$iUnicode = $iUnicode >> 8;
223223
}
224-
return \iconv('utf-32le', $this->sCharset, $sUtf32);
224+
return mb_convert_encoding($sUtf32, $this->sCharset, 'UTF-32LE');
225225
}
226226

227227
if (!$bIsForIdentifier) {

0 commit comments

Comments
 (0)