1<?php 2 3require_once DOKU_INC.'inc/utf8.php'; 4 5// use no mbstring help here 6if(!defined('UTF8_NOMBSTRING')) define('UTF8_NOMBSTRING',1); 7 8class utf8_utf16be_test extends DokuWikiTest { 9 // some chars from various code regions 10 var $utf8 = '鈩ℵŁöx'; 11 var $utf16 = "\x92\x29\x21\x35\x1\x41\x0\xf6\x0\x78"; 12 13 /** 14 * Convert from UTF-8 to UTF-16BE 15 */ 16 function test_to16be(){ 17 $this->assertEquals(utf8_to_utf16be($this->utf8), $this->utf16); 18 } 19 20 /** 21 * Convert from UTF-16BE to UTF-8 22 */ 23 function test_from16be(){ 24 $this->assertEquals(utf16be_to_utf8($this->utf16),$this->utf8); 25 } 26} 27 28//Setup VIM: ex: et ts=2 : 29