Skip to content

Commit c8b6996

Browse files
Issue with non-English text #240
1 parent fc02631 commit c8b6996

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

classes/Visualizer/Source.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -222,9 +222,8 @@ protected function _normalizeData( $data ) {
222222
}
223223
break;
224224
case 'string':
225-
// condition introduced for Issue with non-English text #240 where languages such as Hebrew get messed up.
226-
if ( function_exists( 'mb_detect_encoding' ) && mb_detect_encoding( $data[ $i ] ) !== 'UTF-8' ) {
227-
$data[ $i ] = utf8_encode( $data[ $i ] );
225+
if ( function_exists( 'mb_detect_encoding' ) && mb_detect_encoding( $data[ $i ] ) !== 'ASCII' ) {
226+
$data[ $i ] = \ForceUTF8\Encoding::toUTF8( $data[ $i ] );
228227
}
229228
break;
230229
}

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@
2323
"require": {
2424
"codeinwp/themeisle-sdk": "master",
2525
"xrstf/composer-php52": "^1.0.20",
26-
"PHPOffice/PHPExcel": "^1.8.1"
26+
"PHPOffice/PHPExcel": "^1.8.1",
27+
"neitanod/forceutf8": "~2.0"
2728
},
2829
"autoload": {
2930
"files": [

0 commit comments

Comments
 (0)