Changeset 567 for branches/1.1dev/lib


Ignore:
Timestamp:
Oct 29, 2016 12:41:43 AM (8 years ago)
Author:
anonymous
Message:

Converting email templates to utf-8

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/1.1dev/lib/Email.inc.php

    r566 r567  
    149149            return false;
    150150        }
     151
     152        // Ensure template is UTF-8.
     153        $detected_encoding = mb_detect_encoding($this->_template, array('UTF-8', 'ISO-8859-1', 'WINDOWS-1252'), true);
     154        if ('UTF-8' != strtoupper($detected_encoding)) {
     155            $this->_template = mb_convert_encoding($this->_template, 'UTF-8', $detected_encoding);
     156        }
     157
    151158        // This could be a new template, so reset the _template_replaced.
    152159        $this->_template_replaced = null;
Note: See TracChangeset for help on using the changeset viewer.