From 9f44c21a3c90e984becaea3948ebafe90d89ac56 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 10 Oct 2012 16:07:17 +0300 Subject: Changelog entry for previous commit and change default charset for the Email library to whatever the config array says --- system/core/Utf8.php | 2 +- system/libraries/Email.php | 2 ++ user_guide_src/source/changelog.rst | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/system/core/Utf8.php b/system/core/Utf8.php index 9e6a4eb1b..1ff02981b 100644 --- a/system/core/Utf8.php +++ b/system/core/Utf8.php @@ -136,7 +136,7 @@ class CI_Utf8 { { return @iconv($encoding, 'UTF-8', $str); } - elseif (function_exists('mb_convert_encoding')) + elseif (MB_ENABLED === TRUE) { return @mb_convert_encoding($str, 'UTF-8', $encoding); } diff --git a/system/libraries/Email.php b/system/libraries/Email.php index 1b457aee4..698cb7679 100644 --- a/system/libraries/Email.php +++ b/system/libraries/Email.php @@ -98,6 +98,8 @@ class CI_Email { */ public function __construct($config = array()) { + $this->charset = strtoupper(config_item('charset')); + if (count($config) > 0) { $this->initialize($config); diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index ba2036dd8..8ec32c0fe 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -200,6 +200,7 @@ Release Date: Not Released - Added a *return_path* parameter to the ``from()`` method. - Removed the second parameter (character limit) from internal method ``_prep_quoted_printable()`` as it is never used. - Internal method ``_prep_quoted_printable()`` will now utilize the native ``quoted_printable_encode()`` function on PHP 5.3+ if CRLF is set to "\r\n". + - Default charset now relies on the global ``$config['charset']`` setting. - :doc:`Pagination Library ` changes include: - Added support for the anchor "rel" attribute. - Added support for setting custom attributes. @@ -357,6 +358,7 @@ Bug fixes for 3.0 - Fixed a bug (#1765) - :doc:`Database Library ` didn't properly detect connection errors for MySQLi. - Fixed a bug (#1257) - :doc:`Query Builder ` used to (unnecessarily) group FROM clause contents, which breaks certain queries and is invalid for some databases. - Fixed a bug (#1709) - :doc:`Email ` headers were broken when using long email subjects and \r\n as CRLF. +- Fixed a bug where MB_ENABLED was only declared if UTF8_ENABLED was set to TRUE. Version 2.1.3 ============= -- cgit v1.2.3-24-g4f1b