public function encode8Bit(&$item, $key) {

The above line will generate a fatal error in PHP 5.4.0 as the passing by-reference ability has been depricated in that version. Just a heads up.