Skip to content

Commit

Permalink
Фикс кодировки
Browse files Browse the repository at this point in the history
  • Loading branch information
whitelacoste committed Jun 14, 2024
1 parent 959cee2 commit c75dc20
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/util/help.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ public static function get(string $course, string $lesson): string
protected static function convertFrom1251Possible(string $text): string
{
$isMarketplaceInstallation = (IV_EDU_MODULE_DIR == '/bitrix/modules/intervolga.edu');
if ($isMarketplaceInstallation)

if ($isMarketplaceInstallation && mb_detect_encoding($text) !== 'UTF-8')
{
$text = iconv('cp1251', 'UTF8', $text);
}
Expand Down

0 comments on commit c75dc20

Please sign in to comment.