Example #1
0
 function get_converted_encoding()
 {
     // Update comment with the text body and the creator
     $body = trim($this->mail_text);
     // if the email has a different encoding, change it to the DB connection encoding so mysql doesn't choke
     $enc = $this->get_charset();
     if ($enc) {
         $db = new db_alloc();
         $db->connect();
         $body = mb_convert_encoding($body, $db->get_encoding(), $enc);
     }
     return $body;
 }