php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #79226 quoted_printable_encode() does not fill a 76-character line
Submitted: 2020-02-04 19:08 UTC Modified: 2020-02-04 23:01 UTC
From: bugzilla77 at gmail dot com Assigned:
Status: Not a bug Package: *General Issues
PHP Version: 7.4.2 OS: Windows 10 Pro 1909
Private report: No CVE-ID: None
 [2020-02-04 19:08 UTC] bugzilla77 at gmail dot com
Description:
------------
quoted_printable_encode() does not fill a 76-character line

Test script:
---------------
<?php
 header('Content-Type: text/plain');
 $text='';for($x=0;$x<187;$x++){$text.=chr($x);}
 print(quoted_printable_encode($text));
?>

Expected result:
----------------
=00=01=02=03=04=05=06=07=08=09=0A=0B=0C=0D=0E=0F=10=11=12=13=14=15=16=17=18=
=19=1A=1B=1C=1D=1E=1F !"#$%&'()*+,-./0123456789:;<=3D>?@ABCDEFGHIJKLMNOPQRS=
TUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~=7F=80=81=82=83=84=85=86=87=88=
=89=8A=8B=8C=8D=8E=8F=90=91=92=93=94=95=96=97=98=99=9A=9B=9C=9D=9E=9F=A0=A1=
=A2=A3=A4=A5=A6=A7=A8=A9=AA=AB=AC=AD=AE=AF=B0=B1=B2=B3=B4=B5=B6=B7=B8=B9=BA=

Actual result:
--------------
=00=01=02=03=04=05=06=07=08=09=0A=0B=0C=0D=0E=0F=10=11=12=13=14=15=16=17=18=
=19=1A=1B=1C=1D=1E=1F !"#$%&'()*+,-./0123456789:;<=3D>?@ABCDEFGHIJKLMNOPQRS=
TUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~=7F=80=81=82=83=84=85=86=87=
=88=89=8A=8B=8C=8D=8E=8F=90=91=92=93=94=95=96=97=98=99=9A=9B=9C=9D=9E=9F=
=A0=A1=A2=A3=A4=A5=A6=A7=A8=A9=AA=AB=AC=AD=AE=AF=B0=B1=B2=B3=B4=B5=B6=B7=
=B8=B9=BA

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2020-02-04 19:21 UTC] requinix@php.net
-Status: Open +Status: Not a bug
 [2020-02-04 19:21 UTC] requinix@php.net
See bug #62462
 [2020-02-04 23:01 UTC] bugzilla77 at gmail dot com
It's interesting because e.g. Gmail sends bodys with splited line in the middle of UTF8 character and inboxes don't have a problem with that.
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sat Apr 17 12:01:25 2021 UTC