public function testHighlight_aipaitai_chars()
 {
     $text = 'wkw5 Öm';
     // inuit taima
     $target = 'wkw5 <<<Ö>>>m';
     $highlighted_text = Aipainunavik::highlight_aipaitai_chars($text);
     $this->assertEquals($target, $highlighted_text);
 }
Example #2
0
 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;
 }