<?php

class rfc_2047 {


  static function encoding_encode($str, $encoding = '7bit'){
        if($encoding == "quoted-printable") return quoted_printable_encode($str);
        elseif($encoding == "base64") return rtrim(chunk_split(base64_encode($str), 72),CRLF);
        else return $str; //8bit LOL
    }

  static function header_encode($str){
    if(preg_match("#[^\x20-\x7E]#", $str))
        $str = "=?UTF-8?Q?" . quoted_printable_encode($str)."?=";

    return $str;
  }

}


<?php

class rfc_2047 {


  static function encoding_encode($str, $encoding = '7bit'){
        if($encoding == "quoted-printable") return quoted_printable_encode($str);
        elseif($encoding == "base64") return rtrim(chunk_split(base64_encode($str), 72),CRLF);
        else return $str; //8bit LOL
    }

  static function header_encode($str){
    if(preg_match("#[^\x20-\x7E]#", $str))
        $str = "=?UTF-8?Q?" . php_legacy::quoted_printable_encode_filter($str,1024)."?=";

    return $str;
  }

}


Use php legacy quote printable encode (use word wrap)
Use php legacy quote printable encode (use word wrap)

git-svn-id: 4cd2d1688610a87757c9f4de95975a674329c79f@1735 b8ca103b-dd03-488c-9448-c80b36131af2
