From bc4ebf86269811b775c211e3850ae77fbda21fa6 Mon Sep 17 00:00:00 2001 From: Konrad Abicht Date: Fri, 26 Jun 2020 09:35:27 +0200 Subject: [PATCH] Replacement for #238 (Fix illegal encoding for MacRomanEncoding) (#313) * try fix from @daneren2005 (from #238) to fix failing test in PHP 8.0 --- samples/bugs/Issue229_mac_roman_encoding.pdf | Bin 0 -> 24856 bytes src/Smalot/PdfParser/Font.php | 4 ++-- 2 files changed, 2 insertions(+), 2 deletions(-) create mode 100644 samples/bugs/Issue229_mac_roman_encoding.pdf diff --git a/samples/bugs/Issue229_mac_roman_encoding.pdf b/samples/bugs/Issue229_mac_roman_encoding.pdf new file mode 100644 index 0000000000000000000000000000000000000000..cee808de66607105852014f65c4b49c1163c26fe GIT binary patch literal 24856 zcmdSBbyywAw>F9# z0%#=-t&AN^0L&nfJb+f%)WX5g4s^5tIv5HX>RTHa0=T*1>>cb3ftGMC;AN>xRzxCp z0VfaS=XU*(>Pm5rP;VgXEe^XoyCa$VA+GOz%&tc+X@)*jrIg@yMBxovZ=6I77D9@t z#Sg%jE?h7&G7vB@NGFZrO*`)oFdf;??3wWjox_#tBdW*>j{ zf#xZ;{cbc*8jof_#rp2<=%z?~w*4d!_ZheU@~HuP!lX0eQSZk`veG_{r*&(aG`PcvBV+}^ zSxn`@Yt+gL`}Yv#g1#HXv-@_DY*@BV_{vMO51)!j3J(jGxA0d;feLXLdx(WA^V3X3 zpRSdZB2K5BR@#TyPgqoI@KTbSHrtE)hXS^rn3U2oo3Vk4y#dKOK9ZxVH;mN>l>JPR zJR_<<4xUtzEHsz4JwH6mu%0p)N%>CJW1$O9Q`DwAUjXRMCgN|9-Kk}CvqD-fC+8x4 zoGK@~g;C+E9U-R)5U%mHAy8X3RpCwY%VU;bi4KN@A4!Vh`I7WonP`wI%$GS#BjL7~ z^8e@w6BRXfWYyQptmI*|Nm$jFXJ%2dMdWZ$k?Q{$R_1@ATCsAx?YB{28YLR4o6Q5+ zS57BRu$#YV)m>Tf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q%zwd^<;;P*?6xMsRYQ)m?(69;wCXPF&Z2hPG5b^J#>db( zd&Wt;@A+%>NjNF$uqVEWkbdAj>*d>1V!&{TVeY5K40{55s$Y;r)?>uIxPV{?m_? zUVd?Z+r?I*Y44P0J6AWg1=nwiJl;{i%f6C(+Y&z5GUCH;HvM|SbI{>^(HdShbnOiy z-*@E3EjM;ljXZO`*j_cD@BSS>1gk%|=eC>rH!N%s#<&;tx!-!-Dc3W;-|uCyOI^k1 zrnL;Y@pN>&~*{X>|<0-0SU~Su1cSyI)IX!6g z=Elu0P(^>)*Y!VAylCo(Ia4QJ9v*w@!uG&V<6by%Kv-46E#-F(-?nfG(fHlj3#O$- z$BKsjc;NK6%MYF_4s99xZsqK~AFUd37d<6>sCIF6dCAU={LB6|uDk!-d*}DFKY!9b zTsXdL-t@uAcjt^8ymWfis(yXWx?2w~NG5kI9&>)EG%Wn(vh$J6uN-Z+)z6*x*qPbN z^7qD%DL5?NQuy;?=1nk1&el%YGXDeT{KHIO(%0m~@tv>#C6sWXTlYNmZ2@-c z&aaot^`Vus7mT*gm~l-J8R+}?gBMTP2FamMcJ0Q0=|9SKUB8-3rQU+09dEQ%G)j-I z{piigfybWcQ+UmXukqvlVO}D3MW2`I*D~<*M=CV#!uXg54qwMWAG^r#ABX}o13zO{ zxjK!o)2U>$P9<{=&Y&)hG!6y-Y4o1i1cV)_DF8MCaoXt&U{`d_kii**pss}i=FT87 z(`gLD8l E-@D>X!2kdN literal 0 HcmV?d00001 diff --git a/src/Smalot/PdfParser/Font.php b/src/Smalot/PdfParser/Font.php index cc1cce8b..f5bfdf89 100644 --- a/src/Smalot/PdfParser/Font.php +++ b/src/Smalot/PdfParser/Font.php @@ -482,7 +482,7 @@ public function decodeContent($text, &$unicode) $text = $result; if ($encoding->get('BaseEncoding')->equals('MacRomanEncoding')) { - $text = mb_convert_encoding($text, 'UTF-8', 'Mac'); + $text = mb_convert_encoding($text, 'UTF-8', 'ISO-8859-1'); return $text; } @@ -495,7 +495,7 @@ public function decodeContent($text, &$unicode) if ($this->get('Encoding') instanceof Element && $this->get('Encoding')->equals('MacRomanEncoding') ) { - $text = mb_convert_encoding($text, 'UTF-8', 'Mac'); + $text = mb_convert_encoding($text, 'UTF-8', 'ISO-8859-1'); } else { $text = mb_convert_encoding($text, 'UTF-8', 'Windows-1252'); }