Index: library/Zend/Filter/StringToLower.php =================================================================== --- library/Zend/Filter/StringToLower.php (revision 22663) +++ library/Zend/Filter/StringToLower.php (working copy) @@ -57,6 +57,12 @@ $options = $temp; } + if (!array_key_exists('encoding', $options) + && function_exists('mb_internal_encoding')) + { + $options['encoding'] = mb_internal_encoding(); + } + if (array_key_exists('encoding', $options)) { $this->setEncoding($options['encoding']); } Index: library/Zend/Filter/StringToUpper.php =================================================================== --- library/Zend/Filter/StringToUpper.php (revision 22663) +++ library/Zend/Filter/StringToUpper.php (working copy) @@ -57,6 +57,12 @@ $options = $temp; } + if (!array_key_exists('encoding', $options) + && function_exists('mb_internal_encoding')) + { + $options['encoding'] = mb_internal_encoding(); + } + if (array_key_exists('encoding', $options)) { $this->setEncoding($options['encoding']); } Index: tests/Zend/Filter/StringToLowerTest.php =================================================================== --- tests/Zend/Filter/StringToLowerTest.php (revision 22663) +++ tests/Zend/Filter/StringToLowerTest.php (working copy) @@ -169,4 +169,15 @@ $this->assertContains('mbstring is required', $e->getMessage()); } } + + /** + * @group ZF-9854 + */ + public function testDetectMbInternalEncoding() + { + if (!function_exists('mb_internal_encoding')) { + $this->markTestSkipped("Not detected the function 'mb_internal_encoding'"); + } + $this->assertEquals(mb_internal_encoding(), $this->_filter->getEncoding()); + } } Index: tests/Zend/Filter/StringToUpperTest.php =================================================================== --- tests/Zend/Filter/StringToUpperTest.php (revision 22663) +++ tests/Zend/Filter/StringToUpperTest.php (working copy) @@ -169,4 +169,15 @@ $this->assertContains('mbstring is required', $e->getMessage()); } } + + /** + * @group ZF-9854 + */ + public function testDetectMbInternalEncoding() + { + if (!function_exists('mb_internal_encoding')) { + $this->markTestSkipped("Not detected the function 'mb_internal_encoding'"); + } + $this->assertEquals(mb_internal_encoding(), $this->_filter->getEncoding()); + } }