public function testLegacy_a_unicode_2() { $lu = 'mw'; $arru = array(0xe1, 0x92, 0xa3); $au = implode('', array_map('chr', $arru)); $ru = Aipainunavik::legacyToUnicode($lu, TRUE); $this->assertEquals($au, $ru); }
function transcodeFromLegacy($fromFormat, $toFormat, $aipaitai, $text) { switch ($fromFormat) { case 'nunacom': $transcodedText = Nunacom::legacyToUnicode($text, FALSE); $transcodedText = $this->transcodeFromUnicode($toFormat, $aipaitai, $transcodedText); break; case 'prosyl': $transcodedText = Prosyl::legacyToUnicode($text, FALSE); $transcodedText = $this->transcodeFromUnicode($toFormat, $aipaitai, $transcodedText); break; case 'aipainunavik': $transcodedText = Aipainunavik::legacyToUnicode($text, '-'); $transcodedText = $this->transcodeFromUnicode($toFormat, '-', $transcodedText); break; } return $transcodedText; }