Skip to content

Commit 5576cf6

Browse files
committed
fixed iso-8859-1 encoding #318
1 parent bc80c5d commit 5576cf6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Http/Response.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public function getHtmlContent()
7474
$content = preg_replace('/<head[^>]*>/', '<head><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=shift_jis">', $content);
7575
} elseif (mb_detect_encoding($content, 'ISO-8859-1', true) === 'ISO-8859-1') {
7676
$content = mb_convert_encoding($content, 'HTML-ENTITIES', 'ISO-8859-1');
77-
$content = preg_replace('/<head[^>]*>/', '<head><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">', $content);
77+
$content = preg_replace('/<head[^>]*>/', '<head><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">', $content);
7878
}
7979

8080
$this->htmlContent->loadHTML(trim($content));

0 commit comments

Comments
 (0)