zendframework/zf2 — pull request #6013 by netroby (2014-03-21 01:55:38+00:00)
Title: Fix viewer helper escaper can't set encoding

Current zend view helper escaper using UTF8
as it's default encoding.
When you try to call zend view helper escaper
you will failed when you are not using utf-8
such as you are using gb2312 and other none
UTF-8 encoding.
What's the solution.
You should have the ability to change the
encoding before call the escape function.

example code in view template:

$escaper = $this->escapeHtml()->setEncoding('GB2312');
$escaper->escape("I am html string");