* chcp 28591 (latin1)
* chcp 65001 (utf8)
*
- * @todo add tests for conversion: utf8 -> ascii
+ * @todo add tests for conversion: utf8 -> ascii (incl. chars 0-31 and 127)
* @todo add tests for conversion: latin1 -> utf8
+ * @todo add tests for conversion: latin1 -> ascii (incl. chars 0-31 and 127)
*/
class CharsetTest extends PhpXmlRpc_PolyfillTestCase
{
protected $greek = "Τὴ γλῶσσα μοῦ ἔδωσαν ἑλληνικὴ";
protected $russian = "Река неслася; бедный чёлн";
protected $chinese = "我能吞下玻璃而不伤身体。";
+
protected $latinString;
/// @todo move to usage of a dataProvider and create the latinString there
);
}
+ protected function utf8ToAscii($data)
+ {
+ return Charset::instance()->encodeEntities(
+ $data,
+ 'UTF-8',
+ 'US-ASCII'
+ );
+ }
+
public function testUtf8ToLatin1All()
{
/*$this->assertEquals(