Skip to content

Commit

Permalink
Merge pull request #31 from lazyants/patch-1
Browse files Browse the repository at this point in the history
fix importing not latin characters
  • Loading branch information
curtisdelicata authored May 7, 2024
2 parents 517db94 + 2a3acf3 commit d20bc91
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/Utils/Importer/Sour.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ public static function read($conn, $sour, $obje_ids = [])
if ($sour == null || is_array($sour)) {
return 0;
}
$auth = $sour->getAuth(); // string
$titl = $sour->getTitl(); // string
$abbr = $sour->getAbbr(); // string
$publ = $sour->getPubl(); // string
$rin = $sour->getRin(); // string
$text = $sour->getText(); // string
$auth = mb_convert_encoding($sour->getAuth(), 'UTF-8'); // string
$titl = mb_convert_encoding($sour->getTitl(), 'UTF-8'); // string
$abbr = mb_convert_encoding($sour->getAbbr(), 'UTF-8'); // string
$publ = mb_convert_encoding($sour->getPubl(), 'UTF-8'); // string
$rin = mb_convert_encoding($sour->getRin(), 'UTF-8'); // string
$text = mb_convert_encoding($sour->getText(), 'UTF-8'); // string

$record = Source::on($conn)->updateOrCreate(
['titl' => $titl, 'rin' => $rin, 'auth' => $auth, 'text' => $text, 'publ' => $publ, 'abbr' => $abbr],
Expand Down

0 comments on commit d20bc91

Please sign in to comment.