Skip to content

Commit

Permalink
Tratamento para encode UTF8
Browse files Browse the repository at this point in the history
  • Loading branch information
cassioperin-bling committed Aug 7, 2020
1 parent cc68e82 commit 801f0cd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/OfxParser/Parser.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ public function loadFromFile($ofxFile)
public function loadFromString($ofxContent)
{
$ofxContent = str_replace(["\r\n", "\r"], "\n", $ofxContent);
//$ofxContent = utf8_encode($ofxContent);
if (!mb_check_encoding($ofxContent, "UTF-8")) {
$ofxContent = utf8_encode($ofxContent);
}

$sgmlStart = stripos($ofxContent, '<OFX>');
$ofxHeader = trim(substr($ofxContent, 0, $sgmlStart));
Expand Down

0 comments on commit 801f0cd

Please sign in to comment.