File tree Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -69,6 +69,9 @@ public function getHtmlContent()
69
69
'<head><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8"> ' ,
70
70
$ content
71
71
);
72
+ } elseif (mb_detect_encoding ($ content , 'SJIS ' , true ) === 'SJIS ' ) {
73
+ $ content = mb_convert_encoding ($ content , 'HTML-ENTITIES ' , 'SJIS ' );
74
+ $ content = preg_replace ('/<head[^>]*>/ ' , '<head><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=shift_jis"> ' , $ content );
72
75
} elseif (mb_detect_encoding ($ content , 'ISO-8859-1 ' , true ) === 'ISO-8859-1 ' ) {
73
76
$ content = mb_convert_encoding ($ content , 'HTML-ENTITIES ' , 'ISO-8859-1 ' );
74
77
$ content = preg_replace ('/<head[^>]*>/ ' , '<head><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8"> ' , $ content );
You can’t perform that action at this time.
0 commit comments