public function testEncodeArrayRecursive() { $source = file_get_contents(__DIR__ . DIRECTORY_SEPARATOR . '_fixtures' . DIRECTORY_SEPARATOR . 'utf-8.txt'); $target = file_get_contents(__DIR__ . DIRECTORY_SEPARATOR . '_fixtures' . DIRECTORY_SEPARATOR . 'cp1252.txt'); $input = array(array($source), $source); $expected = array(array($target), $target); $this->assertEquals($expected, $this->filter->filter($input)); }
/** * Converts the text to Windows Codepage 1252 encoding * * @param string $text * * @return string */ protected function convertEncodingForCollmex($text) { $filter = new Utf8ToWindows1252(); return $filter->filter($text); }