Project

General

Profile

« Previous | Next » 

Revision 761

Added by thorn over 16 years ago

search: great speed-up with large pages - requires PHP >= 4.3.3; small speed-up for PHP < 4.3.3.
FCK-Editor: loads large pages faster

View differences:

trunk/CHANGELOG
10 10
# = Bugfix
11 11
! = Update/Change
12 12

  
13
------------------------------------- 2.7.0 -------------------------------------
13
------------------------------------- 2.7.0 -------------------------------------
14
24-Mar-2008 Thomas Hornik
15
#	search: great speed-up with large pages - requires PHP >= 4.3.3; small speed-up for PHP < 4.3.3
16
#	FCK-Editor: loads large pages faster
14 17
23-Mar-2008 Matthias Gallas
15 18
! 	Updated form modul for valid output, removed all javascript (Big thanks to BerndJM)
16 19
17-Mar-2008 Thomas Hornik
trunk/wb/upgrade-script.php
281 281
// cfg_search_description - whether to search in page-description (true/false), def: true [only used while searching title/link/description/keywords]
282 282
// cfg_search_keywords - whether to search in page-keywords (true/false), def: true [only used while searching title/link/description/keywords]
283 283
// cfg_enable_old_search - use old search-method, too (true/false), def: true [use old method as fallback]
284
// cfg_enable_flush - use "ob_flush();flush();" after every page on result page. Will speedup response of result page, but may break template
284 285
$cfg = array(
285 286
	'cfg_show_description' => 'true',
286 287
	'cfg_search_description' => 'true',
287 288
	'cfg_search_keywords' => 'true',
288
	'cfg_enable_old_search' => 'true'
289
	'cfg_enable_old_search' => 'true',
290
	'cfg_enable_flush' => 'false'
289 291
);
290 292
foreach($cfg as $key=>$value) {
291 293
	db_add_search_key_value($key, $value);
trunk/wb/framework/functions-utf8.php
24 24
*/
25 25

  
26 26
/*
27
 * A large part of this file is based on 'utf8.php' from the DokuWiki-project.
27
 * A part of this file is based on 'utf8.php' from the DokuWiki-project.
28 28
 * (http://www.splitbrain.org/projects/dokuwiki):
29 29
 **
30 30
 * UTF8 helper functions
......
33 33
 **
34 34
 * modified for use with Website Baker
35 35
 * from thorn, Jan. 2008
36
 *
37
 * most of the original functions appeared to be to slow with large strings, so i replaced them with my own ones
38
 * thorn, Mar. 2008
36 39
 */
37 40

  
38 41
// Functions we use in Website Baker:
......
48 51
/*
49 52
 * check for mb_string support
50 53
 */
54
//define('UTF8_NOMBSTRING',1); // uncomment this to forbid use of mb_string-functions
51 55
if(!defined('UTF8_MBSTRING')){
52 56
  if(function_exists('mb_substr') && !defined('UTF8_NOMBSTRING')){
53 57
    define('UTF8_MBSTRING',1);
......
73 77
}
74 78

  
75 79
/*
76
 * Strips all highbyte chars
77
 *
78
 * Returns a pure ASCII7 string
79
 *
80
 * @author Andreas Gohr <andi@splitbrain.org>
81
 */
82
function utf8_strip($str){
83
  $ascii = '';
84
  for($i=0; $i<strlen($str); $i++){
85
    if(ord($str{$i}) <128){
86
      $ascii .= $str{$i};
87
    }
88
  }
89
  return $ascii;
90
}
91

  
92
/*
93 80
 * Tries to detect if a string is in Unicode encoding
94 81
 *
95 82
 * @author <bmorel@ssi.fr>
......
114 101
}
115 102

  
116 103
/*
117
 * Unicode aware replacement for strlen()
118
 *
119
 * utf8_decode() converts characters that are not in ISO-8859-1
120
 * to '?', which, for the purpose of counting, is alright - It's
121
 * even faster than mb_strlen.
122
 *
123
 * @author <chernyshevsky at hotmail dot com>
124
 * @see    strlen()
125
 * @see    utf8_decode()
126
 */
127
function utf8_strlen($string){
128
  return strlen(utf8_decode($string));
129
}
130

  
131
/*
132
 * UTF-8 aware alternative to substr
133
 *
134
 * Return part of a string given character offset (and optionally length)
135
 *
136
 * @author Harry Fuecks <hfuecks@gmail.com>
137
 * @author Chris Smith <chris@jalakai.co.uk>
138
 * @param string
139
 * @param integer number of UTF-8 characters offset (from left)
140
 * @param integer (optional) length in UTF-8 characters from offset
141
 * @return mixed string or false if failure
142
 */
143
function utf8_substr($str, $offset, $length = null) {
144
    if(UTF8_MBSTRING){
145
        if( $length === null ){
146
            return mb_substr($str, $offset);
147
        }else{
148
            return mb_substr($str, $offset, $length);
149
        }
150
    }
151

  
152
    /*
153
     * Notes:
154
     *
155
     * no mb string support, so we'll use pcre regex's with 'u' flag
156
     * pcre only supports repetitions of less than 65536, in order to accept up to MAXINT values for
157
     * offset and length, we'll repeat a group of 65535 characters when needed (ok, up to MAXINT-65536)
158
     *
159
     * substr documentation states false can be returned in some cases (e.g. offset > string length)
160
     * mb_substr never returns false, it will return an empty string instead.
161
     *
162
     * calculating the number of characters in the string is a relatively expensive operation, so
163
     * we only carry it out when necessary. It isn't necessary for +ve offsets and no specified length
164
     */
165

  
166
    // cast parameters to appropriate types to avoid multiple notices/warnings
167
    $str = (string)$str;                          // generates E_NOTICE for PHP4 objects, but not PHP5 objects
168
    $offset = (int)$offset;
169
    if (!is_null($length)) $length = (int)$length;
170

  
171
    // handle trivial cases
172
    if ($length === 0) return '';
173
    if ($offset < 0 && $length < 0 && $length < $offset) return '';
174

  
175
    $offset_pattern = '';
176
    $length_pattern = '';
177

  
178
    // normalise -ve offsets (we could use a tail anchored pattern, but they are horribly slow!)
179
    if ($offset < 0) {
180
      $strlen = strlen(utf8_decode($str));        // see notes
181
      $offset = $strlen + $offset;
182
      if ($offset < 0) $offset = 0;
183
    }
184

  
185
    // establish a pattern for offset, a non-captured group equal in length to offset
186
    if ($offset > 0) {
187
      $Ox = (int)($offset/65535);
188
      $Oy = $offset%65535;
189

  
190
      if ($Ox) $offset_pattern = '(?:.{65535}){'.$Ox.'}';
191
      $offset_pattern = '^(?:'.$offset_pattern.'.{'.$Oy.'})';
192
    } else {
193
      $offset_pattern = '^';                      // offset == 0; just anchor the pattern
194
    }
195

  
196
    // establish a pattern for length
197
    if (is_null($length)) {
198
      $length_pattern = '(.*)$';                  // the rest of the string
199
    } else {
200

  
201
      if (!isset($strlen)) $strlen = strlen(utf8_decode($str));    // see notes
202
      if ($offset > $strlen) return '';           // another trivial case
203

  
204
      if ($length > 0) {
205

  
206
        $length = min($strlen-$offset, $length);  // reduce any length that would go passed the end of the string
207

  
208
        $Lx = (int)($length/65535);
209
        $Ly = $length%65535;
210

  
211
        // +ve length requires ... a captured group of length characters
212
        if ($Lx) $length_pattern = '(?:.{65535}){'.$Lx.'}';
213
        $length_pattern = '('.$length_pattern.'.{'.$Ly.'})';
214

  
215
      } else if ($length < 0) {
216

  
217
        if ($length < ($offset - $strlen)) return '';
218

  
219
        $Lx = (int)((-$length)/65535);
220
        $Ly = (-$length)%65535;
221

  
222
        // -ve length requires ... capture everything except a group of -length characters
223
        //                         anchored at the tail-end of the string
224
        if ($Lx) $length_pattern = '(?:.{65535}){'.$Lx.'}';
225
        $length_pattern = '(.*)(?:'.$length_pattern.'.{'.$Ly.'})$';
226
      }
227
    }
228

  
229
    if (!preg_match('#'.$offset_pattern.$length_pattern.'#us',$str,$match)) return '';
230
    return $match[1];
231
}
232

  
233
/*
234
 * Unicode aware replacement for substr_replace()
235
 *
236
 * @author Andreas Gohr <andi@splitbrain.org>
237
 * @see    substr_replace()
238
 */
239
function utf8_substr_replace($string, $replacement, $start , $length=0 ){
240
  $ret = '';
241
  if($start>0) $ret .= utf8_substr($string, 0, $start);
242
  $ret .= $replacement;
243
  $ret .= utf8_substr($string, $start+$length);
244
  return $ret;
245
}
246

  
247
/*
248
 * Unicode aware replacement for ltrim()
249
 *
250
 * @author Andreas Gohr <andi@splitbrain.org>
251
 * @see    ltrim()
252
 * @return string
253
 */
254
function utf8_ltrim($str,$charlist=''){
255
  if($charlist == '') return ltrim($str);
256

  
257
  //quote charlist for use in a characterclass
258
  $charlist = preg_replace('!([\\\\\\-\\]\\[/])!','\\\${1}',$charlist);
259

  
260
  return preg_replace('/^['.$charlist.']+/u','',$str);
261
}
262

  
263
/*
264
 * Unicode aware replacement for rtrim()
265
 *
266
 * @author Andreas Gohr <andi@splitbrain.org>
267
 * @see    rtrim()
268
 * @return string
269
 */
270
function  utf8_rtrim($str,$charlist=''){
271
  if($charlist == '') return rtrim($str);
272

  
273
  //quote charlist for use in a characterclass
274
  $charlist = preg_replace('!([\\\\\\-\\]\\[/])!','\\\${1}',$charlist);
275

  
276
  return preg_replace('/['.$charlist.']+$/u','',$str);
277
}
278

  
279
/*
280
 * Unicode aware replacement for trim()
281
 *
282
 * @author Andreas Gohr <andi@splitbrain.org>
283
 * @see    trim()
284
 * @return string
285
 */
286
function  utf8_trim($str,$charlist='') {
287
  if($charlist == '') return trim($str);
288

  
289
  return utf8_ltrim(utf8_rtrim($str,$charlist),$charlist);
290
}
291

  
292
/*
293
 * This is a unicode aware replacement for strtolower()
294
 *
295
 * Uses mb_string extension if available
296
 *
297
 * @author Leo Feyer <leo@typolight.org>
298
 * @see    strtolower()
299
 * @see    utf8_strtoupper()
300
 */
301
function utf8_strtolower($string){
302
  if(UTF8_MBSTRING) return mb_strtolower($string,'utf-8');
303

  
304
  global $UTF8_UPPER_TO_LOWER;
305
  return strtr($string,$UTF8_UPPER_TO_LOWER);
306
}
307

  
308
/*
309
 * This is a unicode aware replacement for strtoupper()
310
 *
311
 * Uses mb_string extension if available
312
 *
313
 * @author Leo Feyer <leo@typolight.org>
314
 * @see    strtoupper()
315
 * @see    utf8_strtoupper()
316
 */
317
function utf8_strtoupper($string){
318
  if(UTF8_MBSTRING) return mb_strtoupper($string,'utf-8');
319

  
320
  global $UTF8_LOWER_TO_UPPER;
321
  return strtr($string,$UTF8_LOWER_TO_UPPER);
322
}
323

  
324
/*
325 104
 * Romanize a non-latin string
326 105
 *
327 106
 * @author Andreas Gohr <andi@splitbrain.org>
......
356 135
}
357 136

  
358 137
/*
359
 * This is an Unicode aware replacement for strpos
360
 *
361
 * @author Leo Feyer <leo@typolight.org>
362
 * @see    strpos()
363
 * @param  string
364
 * @param  string
365
 * @param  integer
366
 * @return integer
138
 * added functions - thorn
367 139
 */
368
function utf8_strpos($haystack, $needle, $offset=0){
369
    $comp = 0;
370
    $length = null;
371 140

  
372
    while (is_null($length) || $length < $offset) {
373
        $pos = strpos($haystack, $needle, $offset + $comp);
374

  
375
        if ($pos === false)
376
            return false;
377

  
378
        $length = utf8_strlen(substr($haystack, 0, $pos));
379

  
380
        if ($length < $offset)
381
            $comp = $pos - $length;
382
    }
383

  
384
    return $length;
385
}
386

  
387 141
/*
388
 * Encodes UTF-8 characters to HTML entities
389
 *
390
 * @author Tom N Harris <tnharris@whoopdedo.org>
391
 * @author <vpribish at shopping dot com>
392
 * @link   http://www.php.net/manual/en/function.utf8-decode.php
142
 * faster replacement for utf8_entities_to_umlauts()
143
 * not all features of utf8_entities_to_umlauts() --> utf8_unhtml() are supported!
144
 * @author thorn
393 145
 */
394
function utf8_tohtml ($str) {
395
    $ret = '';
396
    foreach (utf8_to_unicode($str) as $cp) {
397
        if ($cp < 0x80)
398
            $ret .= chr($cp);
399
        //elseif ($cp < 0x100)
400
        //    $ret .= "&#$cp;";
401
        else
402
            $ret .= "&#$cp;";
403
        //    $ret .= '&#x'.dechex($cp).';';
404
    }
405
    return $ret;
146
function utf8_fast_entities_to_umlauts($str) {
147
	if(UTF8_MBSTRING) {
148
		// we need this for use with mb_convert_encoding
149
		$str = str_replace(array('&amp;','&gt;','&lt;','&quot;','&#39;','&nbsp;'), array('&amp;amp;','&amp;gt;','&amp;lt;','&amp;quot;','&amp;#39;','&amp;nbsp;'), $str);
150
		// we need two mb_convert_encoding()-calls - is this a bug?
151
		// mb_convert_encoding("ö&ouml;", 'UTF-8', 'HTML-ENTITIES'); // with string in utf-8-encoding doesn't work. Result: "öö"
152
		// Work-around: convert all umlauts to entities first ("ö&ouml;"->"&ouml;&ouml;"), then all entities to umlauts ("&ouml;&ouml;"->"öö")
153
		return(mb_convert_encoding(mb_convert_encoding($str, 'HTML-ENTITIES', 'UTF-8'),'UTF-8', 'HTML-ENTITIES'));
154
	} else {
155
		global $named_entities;global $numbered_entities;
156
		$str = str_replace($named_entities, $numbered_entities, $str);
157
		$str = preg_replace("/&#([0-9]+);/e", "code_to_utf8($1)", $str);
158
	}
159
	return($str);
406 160
}
407

  
408
/*
409
 * Decodes HTML entities to UTF-8 characters
410
 *
411
 * Convert any &#..; entity to a codepoint,
412
 * The entities flag defaults to only decoding numeric entities.
413
 * Pass HTML_ENTITIES and named entities, including &amp; &lt; etc.
414
 * are handled as well. Avoids the problem that would occur if you
415
 * had to decode "&amp;#38;&#38;amp;#38;"
416
 *
417
 * unhtmlspecialchars(utf8_unhtml($s)) -> "&#38;&#38;"
418
 * utf8_unhtml(unhtmlspecialchars($s)) -> "&&amp#38;"
419
 * what it should be                   -> "&#38;&amp#38;"
420
 *
421
 * @author Tom N Harris <tnharris@whoopdedo.org>
422
 * @param  string  $str      UTF-8 encoded string
423
 * @param  boolean $entities Flag controlling decoding of named entities.
424
 * @return UTF-8 encoded string with numeric (and named) entities replaced.
425
 */
426
function utf8_unhtml($str, $entities=null) {
427
    static $decoder = null;
428
    if (is_null($decoder))
429
      $decoder = new utf8_entity_decoder();
430
    if (is_null($entities))
431
        return preg_replace_callback('/(&#([Xx])?([0-9A-Za-z]+);)/m',
432
                                     'utf8_decode_numeric', $str);
433
    else
434
        return preg_replace_callback('/&(#)?([Xx])?([0-9A-Za-z]+);/m',
435
                                     array(&$decoder, 'decode'), $str);
161
// support-function for utf8_fast_entities_to_umlauts()
162
function code_to_utf8($num) {
163
	if ($num <= 0x7F) {
164
		return chr($num);
165
	} elseif ($num <= 0x7FF) {
166
		return chr(($num >> 6) + 192) . chr(($num & 63) + 128);
167
	} elseif ($num <= 0xFFFF) {
168
		 return chr(($num >> 12) + 224) . chr((($num >> 6) & 63) + 128) . chr(($num & 63) + 128);
169
	} elseif ($num <= 0x1FFFFF) {
170
		return chr(($num >> 18) + 240) . chr((($num >> 12) & 63) + 128) . chr((($num >> 6) & 63) + 128) . chr(($num & 63) + 128);
171
	}
172
	return "?";
436 173
}
437
function utf8_decode_numeric($ent) {
438
    switch ($ent[2]) {
439
      case 'X':
440
      case 'x':
441
          $cp = hexdec($ent[3]);
442
          break;
443
      default:
444
          $cp = intval($ent[3]);
445
          break;
446
    }
447
    return unicode_to_utf8(array($cp));
448
}
449
class utf8_entity_decoder {
450
    var $table;
451
    function utf8_entity_decoder() {
452
        $table = get_html_translation_table(HTML_ENTITIES);
453
        $table = array_flip($table);
454
        $this->table = array_map(array(&$this,'makeutf8'), $table);
455
    }
456
    function makeutf8($c) {
457
        return unicode_to_utf8(array(ord($c)));
458
    }
459
    function decode($ent) {
460
        if ($ent[1] == '#') {
461
            return utf8_decode_numeric($ent);
462
        } elseif (array_key_exists($ent[0],$this->table)) {
463
            return $this->table[$ent[0]];
464
        } else {
465
            return $ent[0];
466
        }
467
    }
468
}
469 174

  
470 175
/*
471
 * Takes an UTF-8 string and returns an array of ints representing the
472
 * Unicode characters. Astral planes are supported ie. the ints in the
473
 * output can be > 0xFFFF. Occurrances of the BOM are ignored. Surrogates
474
 * are not allowed.
475
 *
476
 * If $strict is set to true the function returns false if the input
477
 * string isn't a valid UTF-8 octet sequence and raises a PHP error at
478
 * level E_USER_WARNING
479
 *
480
 * Note: this function has been modified slightly in this library to
481
 * trigger errors on encountering bad bytes
482
 *
483
 * @author <hsivonen@iki.fi>
484
 * @author Harry Fuecks <hfuecks@gmail.com>
485
 * @param  string  UTF-8 encoded string
486
 * @param  boolean Check for invalid sequences?
487
 * @return mixed array of unicode code points or false if UTF-8 invalid
488
 * @see    unicode_to_utf8
489
 * @link   http://hsivonen.iki.fi/php-utf8/
490
 * @link   http://sourceforge.net/projects/phputf8/
176
 * faster replacement for utf8_umlauts_to_entities()
177
 * not all features of utf8_umlauts_to_entities() --> utf8_tohtml() are supported!
178
 * @author thorn
491 179
 */
492
function utf8_to_unicode($str,$strict=false) {
493
    $mState = 0;     // cached expected number of octets after the current octet
494
                     // until the beginning of the next UTF8 character sequence
495
    $mUcs4  = 0;     // cached Unicode character
496
    $mBytes = 1;     // cached expected number of octets in the current sequence
497

  
498
    $out = array();
499

  
500
    $len = strlen($str);
501

  
502
    for($i = 0; $i < $len; $i++) {
503

  
504
        $in = ord($str{$i});
505

  
506
        if ( $mState == 0) {
507

  
508
            // When mState is zero we expect either a US-ASCII character or a
509
            // multi-octet sequence.
510
            if (0 == (0x80 & ($in))) {
511
                // US-ASCII, pass straight through.
512
                $out[] = $in;
513
                $mBytes = 1;
514

  
515
            } else if (0xC0 == (0xE0 & ($in))) {
516
                // First octet of 2 octet sequence
517
                $mUcs4 = ($in);
518
                $mUcs4 = ($mUcs4 & 0x1F) << 6;
519
                $mState = 1;
520
                $mBytes = 2;
521

  
522
            } else if (0xE0 == (0xF0 & ($in))) {
523
                // First octet of 3 octet sequence
524
                $mUcs4 = ($in);
525
                $mUcs4 = ($mUcs4 & 0x0F) << 12;
526
                $mState = 2;
527
                $mBytes = 3;
528

  
529
            } else if (0xF0 == (0xF8 & ($in))) {
530
                // First octet of 4 octet sequence
531
                $mUcs4 = ($in);
532
                $mUcs4 = ($mUcs4 & 0x07) << 18;
533
                $mState = 3;
534
                $mBytes = 4;
535

  
536
            } else if (0xF8 == (0xFC & ($in))) {
537
                /* First octet of 5 octet sequence.
538
                 *
539
                 * This is illegal because the encoded codepoint must be either
540
                 * (a) not the shortest form or
541
                 * (b) outside the Unicode range of 0-0x10FFFF.
542
                 * Rather than trying to resynchronize, we will carry on until the end
543
                 * of the sequence and let the later error handling code catch it.
544
                 */
545
                $mUcs4 = ($in);
546
                $mUcs4 = ($mUcs4 & 0x03) << 24;
547
                $mState = 4;
548
                $mBytes = 5;
549

  
550
            } else if (0xFC == (0xFE & ($in))) {
551
                // First octet of 6 octet sequence, see comments for 5 octet sequence.
552
                $mUcs4 = ($in);
553
                $mUcs4 = ($mUcs4 & 1) << 30;
554
                $mState = 5;
555
                $mBytes = 6;
556

  
557
            } elseif($strict) {
558
                /* Current octet is neither in the US-ASCII range nor a legal first
559
                 * octet of a multi-octet sequence.
560
                 */
561
                trigger_error(
562
                        'utf8_to_unicode: Illegal sequence identifier '.
563
                            'in UTF-8 at byte '.$i,
564
                        E_USER_WARNING
565
                    );
566
                return false;
567

  
568
            }
569

  
570
        } else {
571

  
572
            // When mState is non-zero, we expect a continuation of the multi-octet
573
            // sequence
574
            if (0x80 == (0xC0 & ($in))) {
575

  
576
                // Legal continuation.
577
                $shift = ($mState - 1) * 6;
578
                $tmp = $in;
579
                $tmp = ($tmp & 0x0000003F) << $shift;
580
                $mUcs4 |= $tmp;
581

  
582
                /*
583
                 * End of the multi-octet sequence. mUcs4 now contains the final
584
                 * Unicode codepoint to be output
585
                 */
586
                if (0 == --$mState) {
587

  
588
                    /*
589
                     * Check for illegal sequences and codepoints.
590
                     */
591
                    // From Unicode 3.1, non-shortest form is illegal
592
                    if (((2 == $mBytes) && ($mUcs4 < 0x0080)) ||
593
                        ((3 == $mBytes) && ($mUcs4 < 0x0800)) ||
594
                        ((4 == $mBytes) && ($mUcs4 < 0x10000)) ||
595
                        (4 < $mBytes) ||
596
                        // From Unicode 3.2, surrogate characters are illegal
597
                        (($mUcs4 & 0xFFFFF800) == 0xD800) ||
598
                        // Codepoints outside the Unicode range are illegal
599
                        ($mUcs4 > 0x10FFFF)) {
600

  
601
                        if($strict){
602
                            trigger_error(
603
                                    'utf8_to_unicode: Illegal sequence or codepoint '.
604
                                        'in UTF-8 at byte '.$i,
605
                                    E_USER_WARNING
606
                                );
607

  
608
                            return false;
609
                        }
610

  
611
                    }
612

  
613
                    if (0xFEFF != $mUcs4) {
614
                        // BOM is legal but we don't want to output it
615
                        $out[] = $mUcs4;
616
                    }
617

  
618
                    //initialize UTF8 cache
619
                    $mState = 0;
620
                    $mUcs4  = 0;
621
                    $mBytes = 1;
622
                }
623

  
624
            } elseif($strict) {
625
                /*
626
                 *((0xC0 & (*in) != 0x80) && (mState != 0))
627
                 * Incomplete multi-octet sequence.
628
                 */
629
                trigger_error(
630
                        'utf8_to_unicode: Incomplete multi-octet '.
631
                        '   sequence in UTF-8 at byte '.$i,
632
                        E_USER_WARNING
633
                    );
634

  
635
                return false;
636
            }
637
        }
638
    }
639
    return $out;
180
function utf8_fast_umlauts_to_entities($string, $named_entities=true) {
181
	if(UTF8_MBSTRING)
182
		return(mb_convert_encoding($string, 'HTML-ENTITIES', 'UTF-8'));
183
	else {
184
		global $named_entities;global $numbered_entities;
185
		$new = "";
186
		$i=0;
187
		$len=strlen($string);
188
		if($len==0) return $string;
189
		do {
190
			if(ord($string{$i}) <= 127) $ud = $string{$i++};
191
			elseif(ord($string{$i}) <= 223) $ud = (ord($string{$i++})-192)*64 + (ord($string{$i++})-128);
192
			elseif(ord($string{$i}) <= 239) $ud = (ord($string{$i++})-224)*4096 + (ord($string{$i++})-128)*64 + (ord($string{$i++})-128);
193
			elseif(ord($string{$i}) <= 247) $ud = (ord($string{$i++})-240)*262144 + (ord($string{$i++})-128)*4096 + (ord($string{$i++})-128)*64 + (ord($string{$i++})-128);
194
			else $ud = ord($string{$i++}); // error!
195
			if($ud > 127) {
196
				$new .= "&#$ud;";
197
			} else {
198
				$new .= $ud;
199
			}
200
		} while($i < $len);
201
		$string = $new;
202
		if($named_entities)
203
			$string = str_replace($numbered_entities, $named_entities, $string);
204
	}
205
	return($string);
640 206
}
641 207

  
642 208
/*
643
 * Takes an array of ints representing the Unicode characters and returns
644
 * a UTF-8 string. Astral planes are supported ie. the ints in the
645
 * input can be > 0xFFFF. Occurrances of the BOM are ignored. Surrogates
646
 * are not allowed.
647
 *
648
 * If $strict is set to true the function returns false if the input
649
 * array contains ints that represent surrogates or are outside the
650
 * Unicode range and raises a PHP error at level E_USER_WARNING
651
 *
652
 * Note: this function has been modified slightly in this library to use
653
 * output buffering to concatenate the UTF-8 string (faster) as well as
654
 * reference the array by it's keys
655
 *
656
 * @param  array of unicode code points representing a string
657
 * @param  boolean Check for invalid sequences?
658
 * @return mixed UTF-8 string or false if array contains invalid code points
659
 * @author <hsivonen@iki.fi>
660
 * @author Harry Fuecks <hfuecks@gmail.com>
661
 * @see    utf8_to_unicode
662
 * @link   http://hsivonen.iki.fi/php-utf8/
663
 * @link   http://sourceforge.net/projects/phputf8/
664
 */
665
function unicode_to_utf8($arr,$strict=false) {
666
    if (!is_array($arr)) return '';
667
    ob_start();
668

  
669
    foreach (array_keys($arr) as $k) {
670

  
671
        # ASCII range (including control chars)
672
        if ( ($arr[$k] >= 0) && ($arr[$k] <= 0x007f) ) {
673

  
674
            echo chr($arr[$k]);
675

  
676
        # 2 byte sequence
677
        } else if ($arr[$k] <= 0x07ff) {
678

  
679
            echo chr(0xc0 | ($arr[$k] >> 6));
680
            echo chr(0x80 | ($arr[$k] & 0x003f));
681

  
682
        # Byte order mark (skip)
683
        } else if($arr[$k] == 0xFEFF) {
684

  
685
            // nop -- zap the BOM
686

  
687
        # Test for illegal surrogates
688
        } else if ($arr[$k] >= 0xD800 && $arr[$k] <= 0xDFFF) {
689

  
690
            // found a surrogate
691
            if($strict){
692
                trigger_error(
693
                    'unicode_to_utf8: Illegal surrogate '.
694
                        'at index: '.$k.', value: '.$arr[$k],
695
                    E_USER_WARNING
696
                    );
697
                return false;
698
            }
699

  
700
        # 3 byte sequence
701
        } else if ($arr[$k] <= 0xffff) {
702

  
703
            echo chr(0xe0 | ($arr[$k] >> 12));
704
            echo chr(0x80 | (($arr[$k] >> 6) & 0x003f));
705
            echo chr(0x80 | ($arr[$k] & 0x003f));
706

  
707
        # 4 byte sequence
708
        } else if ($arr[$k] <= 0x10ffff) {
709

  
710
            echo chr(0xf0 | ($arr[$k] >> 18));
711
            echo chr(0x80 | (($arr[$k] >> 12) & 0x3f));
712
            echo chr(0x80 | (($arr[$k] >> 6) & 0x3f));
713
            echo chr(0x80 | ($arr[$k] & 0x3f));
714

  
715
        } elseif($strict) {
716

  
717
            trigger_error(
718
                'unicode_to_utf8: Codepoint out of Unicode range '.
719
                    'at index: '.$k.', value: '.$arr[$k],
720
                E_USER_WARNING
721
                );
722

  
723
            // out of range
724
            return false;
725
        }
726
    }
727

  
728
    $result = ob_get_contents();
729
    ob_end_clean();
730
    return $result;
731
}
732

  
733
/*
734
 * Replace bad bytes with an alternative character
735
 *
736
 * ASCII character is recommended for replacement char
737
 *
738
 * PCRE Pattern to locate bad bytes in a UTF-8 string
739
 * Comes from W3 FAQ: Multilingual Forms
740
 * Note: modified to include full ASCII range including control chars
741
 *
742
 * @author Harry Fuecks <hfuecks@gmail.com>
743
 * @see http://www.w3.org/International/questions/qa-forms-utf-8
744
 * @param string to search
745
 * @param string to replace bad bytes with (defaults to '?') - use ASCII
746
 * @return string
747
 */
748
function utf8_bad_replace($str, $replace = '') {
749
    $UTF8_BAD =
750
     '([\x00-\x7F]'.                          # ASCII (including control chars)
751
     '|[\xC2-\xDF][\x80-\xBF]'.               # non-overlong 2-byte
752
     '|\xE0[\xA0-\xBF][\x80-\xBF]'.           # excluding overlongs
753
     '|[\xE1-\xEC\xEE\xEF][\x80-\xBF]{2}'.    # straight 3-byte
754
     '|\xED[\x80-\x9F][\x80-\xBF]'.           # excluding surrogates
755
     '|\xF0[\x90-\xBF][\x80-\xBF]{2}'.        # planes 1-3
756
     '|[\xF1-\xF3][\x80-\xBF]{3}'.            # planes 4-15
757
     '|\xF4[\x80-\x8F][\x80-\xBF]{2}'.        # plane 16
758
     '|(.{1}))';                              # invalid byte
759
    ob_start();
760
    while (preg_match('/'.$UTF8_BAD.'/S', $str, $matches)) {
761
        if ( !isset($matches[2])) {
762
            echo $matches[0];
763
        } else {
764
            echo $replace;
765
        }
766
        $str = substr($str,strlen($matches[0]));
767
    }
768
    $result = ob_get_contents();
769
    ob_end_clean();
770
    return $result;
771
}
772

  
773
/*
774
 * URL-Encode a filename to allow unicodecharacters
775
 *
776
 * Slashes are not encoded
777
 *
778
 * When the second parameter is true the string will
779
 * be encoded only if non ASCII characters are detected -
780
 * This makes it safe to run it multiple times on the
781
 * same string (default is true)
782
 *
783
 * @author Andreas Gohr <andi@splitbrain.org>
784
 * @see    urlencode
785
 */
786
function utf8_encodeFN($file,$safe=true){
787
  if($safe && preg_match('#^[a-zA-Z0-9/_\-.%]+$#',$file)){
788
    return $file;
789
  }
790
  $file = urlencode($file);
791
  $file = str_replace('%2F','/',$file);
792
  return $file;
793
}
794

  
795
/*
796
 * URL-Decode a filename
797
 *
798
 * This is just a wrapper around urldecode
799
 *
800
 * @author Andreas Gohr <andi@splitbrain.org>
801
 * @see    urldecode
802
 */
803
function utf8_decodeFN($file){
804
  $file = urldecode($file);
805
  return $file;
806
}
807

  
808
/*
809
 * Moved some functions from framework/functions.php to here - thorn
810
 */
811

  
812
/*
813
 * Decode HTML entities to UTF-8 characters
814
 * 
815
 * Will replace all numeric and named entities, except
816
 * &gt; &lt; &apos; &quot; &#39; &nbsp;
817
 * 
818
 * @param  string UTF-8 or ASCII encoded string
819
 * @return string UTF-8 encoded string with numeric and named entities replaced.
820
 */
821
function utf8_entities_to_umlauts($str) {
822
	global $named_to_numbered_entities;
823
	// we have to prevent "&#39;" from beeing decoded
824
	$str = str_replace("&#39;", "&_#39;", $str);
825
	$str = strtr($str, $named_to_numbered_entities);
826
	$str = utf8_unhtml($str);
827
	$str = str_replace("&_#39;", "&#39;", $str);
828

  
829
	return($str);
830
}
831

  
832
/*
833
 * Encode UTF-8 characters to HTML entities
834
 *
835
 * Will replace all UTF-8 encoded characters to numeric/named entities
836
 *
837
 * @param  string UTF-8 encoded string
838
 * @param  bool Replace numbered by named entities
839
 * @return string ASCII encoded string with all UTF-8 characters replaced by numeric/named entities
840
 */
841
function utf8_umlauts_to_entities($str, $named_entities=true) {
842
	global $numbered_to_named_entities;
843
	$str = utf8_tohtml($str);
844
	if($named_entities)
845
		$str = strtr($str, $numbered_to_named_entities);
846
	return($str);
847
}
848

  
849
/*
850 209
 * Converts from various charsets to UTF-8
851 210
 *
852 211
 * Will convert a string from various charsets to UTF-8.
853
 * HTML-entities will be converted, too.
212
 * HTML-entities may be converted, too.
854 213
 * In case of error the returned string is unchanged, and a message is emitted.
855 214
 * Supported charsets are:
856 215
 * direct: iso_8859_1 iso_8859_2 iso_8859_3 iso_8859_4 iso_8859_5
......
862 221
 * @param  string  The charset to convert from, defaults to DEFAULT_CHARSET
863 222
 * @return string  A string in UTF-8-encoding, with all entities decoded, too.
864 223
 *                 String is unchanged in case of error.
224
 * @author thorn
865 225
 */
866
function charset_to_utf8($str, $charset_in=DEFAULT_CHARSET) {
226
function charset_to_utf8($str, $charset_in=DEFAULT_CHARSET, $decode_entities=true) {
867 227
	global $iso_8859_2_to_utf8, $iso_8859_3_to_utf8, $iso_8859_4_to_utf8, $iso_8859_5_to_utf8, $iso_8859_6_to_utf8, $iso_8859_7_to_utf8, $iso_8859_8_to_utf8, $iso_8859_9_to_utf8, $iso_8859_10_to_utf8, $iso_8859_11_to_utf8;
868 228
	$charset_in = strtoupper($charset_in);
869 229
	if ($charset_in == "") { $charset_in = 'UTF-8'; }
......
882 242
	// check if we have UTF-8 or a plain ASCII string
883 243
	if($charset_in == 'UTF-8' || utf8_isASCII($str)) {
884 244
		// we have utf-8. Just replace HTML-entities and return
885
		if(preg_match('/&[#0-9a-zA-Z]+;/',$str))
886
			return(utf8_entities_to_umlauts($str));
245
		if($decode_entities && preg_match('/&[#0-9a-zA-Z]+;/',$str))
246
			return(utf8_fast_entities_to_umlauts($str));
887 247
		else // nothing to do
888 248
			return($str);
889 249
	}
......
920 280
	}
921 281
	if($converted) {
922 282
		// we have utf-8, now replace HTML-entities and return
923
		if(preg_match('/&[#0-9a-zA-Z]+;/',$str))
924
			$str = utf8_entities_to_umlauts($str);
925
		// just to be sure, replace bad characters
926
		$str = utf8_bad_replace($str, '?');
283
		if($decode_entities && preg_match('/&[#0-9a-zA-Z]+;/',$str))
284
			$str = utf8_fast_entities_to_umlauts($str);
927 285
		return($str);
928 286
	}
929 287
	
......
940 298
 * Converts from UTF-8 to various charsets
941 299
 *
942 300
 * Will convert a string from UTF-8 to various charsets.
943
 * HTML-entities will be converted, too.
301
 * HTML-entities will not! be converted.
944 302
 * In case of error the returned string is unchanged, and a message is emitted.
945 303
 * Supported charsets are:
946 304
 * direct: iso_8859_1 iso_8859_2 iso_8859_3 iso_8859_4 iso_8859_5
......
952 310
 * @param  string  The charset to convert to, defaults to DEFAULT_CHARSET
953 311
 * @return string  A string in a supported encoding, with all entities decoded, too.
954 312
 *                 String is unchanged in case of error.
313
 * @author thorn
955 314
 */
956 315
function utf8_to_charset($str, $charset_out=DEFAULT_CHARSET) {
957 316
	global $utf8_to_iso_8859_2, $utf8_to_iso_8859_3, $utf8_to_iso_8859_4, $utf8_to_iso_8859_5, $utf8_to_iso_8859_6, $utf8_to_iso_8859_7, $utf8_to_iso_8859_8, $utf8_to_iso_8859_9, $utf8_to_iso_8859_10, $utf8_to_iso_8859_11;
......
968 327
		return($str);
969 328
	}
970 329
	
330
	// the string comes from charset_to_utf8(), so we can skip this
971 331
	// replace HTML-entities first
972
	if(preg_match('/&[#0-9a-zA-Z]+;/',$str))
973
		$str = utf8_entities_to_umlauts($str);
332
	//if(preg_match('/&[#0-9a-zA-Z]+;/',$str))
333
	//	$str = utf8_entities_to_umlauts($str);
974 334
	
975 335
	// check if we need to convert
976 336
	if($charset_out == 'UTF-8' || utf8_isASCII($str)) {
......
1030 390
 *
1031 391
 * @param  string  Filename to convert (all encodings from charset_to_utf8() are allowed)
1032 392
 * @return string  ASCII encoded string, to use as filename in wb's page_filename() and media_filename
393
 * @author thorn
1033 394
 */
1034 395
function entities_to_7bit($str) {
1035 396
	// convert to UTF-8
......
1042 403
	$str = utf8_romanize($str);
1043 404
	// missed some? - Many UTF-8-chars can't be romanized
1044 405
	// convert to HTML-entities, and replace entites by hex-numbers
1045
	$str = utf8_umlauts_to_entities($str, false);
406
	$str = utf8_fast_umlauts_to_entities($str, false);
1046 407
	$str = str_replace('&#39;', '&apos;', $str);
1047 408
	$str = preg_replace('/&#([0-9]+);/e', "dechex('$1')",  $str);
1048 409
	// maybe there are some &gt; &lt; &apos; &quot; &amp; &nbsp; left, replace them too
......
1057 418
 * 
1058 419
 * Will replace all numeric and named entities except
1059 420
 * &gt; &lt; &apos; &quot; &#39; &nbsp;
1060
 * In case of error the returned string is unchanged, and a message is emitted.
1061
 * Supported charsets are:
1062
 * direct: iso_8859_1 iso_8859_2 iso_8859_3 iso_8859_4 iso_8859_5
1063
 *         iso_8859_6 iso_8859_7 iso_8859_8 iso_8859_9 iso_8859_10 iso_8859_11
1064
 * mb_convert_encoding: all wb charsets (except those from 'direct'); but not GB2312
1065
 * iconv:  all wb charsets (except those from 'direct')
1066
 * 
1067
 * @param  string  A string in DEFAULT_CHARSET encoding
1068
 * @return string  A string in $charset_out encoding with numeric and named entities replaced.
1069
 *         The string is unchanged in case of error. 
421
 * @author thorn
1070 422
 */
1071 423
function entities_to_umlauts2($string, $charset_out=DEFAULT_CHARSET) {
1072
	$string = charset_to_utf8($string, DEFAULT_CHARSET);
1073
	//if(utf8_check($string)) // this is to much time-consuming
424
	$string = charset_to_utf8($string, DEFAULT_CHARSET, true);
425
	//if(utf8_check($string)) // this check is to much time-consuming (this may fail only if AddDefaultCharset is set)
1074 426
		$string = utf8_to_charset($string, $charset_out);
1075 427
	return ($string);
1076 428
}
......
1079 431
 * Convert a string from mixed html-entities/umlauts to pure ASCII with HTML-entities
1080 432
 * 
1081 433
 * Will convert a string in $charset_in encoding to a pure ASCII string with HTML-entities.
1082
 * In case of error the returned string is unchanged, and a message is emitted.
1083
 * Supported charsets are:
1084
 * direct: iso_8859_1 iso_8859_2 iso_8859_3 iso_8859_4 iso_8859_5
1085
 *         iso_8859_6 iso_8859_7 iso_8859_8 iso_8859_9 iso_8859_10 iso_8859_11
1086
 * mb_convert_encoding: all wb charsets (except those from 'direct'); but not GB2312
1087
 * iconv:  all wb charsets (except those from 'direct')
1088
 * 
1089
 * @param  string  A string in $charset_in encoding
1090
 * @return string  A string in ASCII encoding with numeric and named entities.
1091
 *         The string is unchanged in case of error. 
434
 * @author thorn
1092 435
 */
1093 436
function umlauts_to_entities2($string, $charset_in=DEFAULT_CHARSET) {
1094
	$string = charset_to_utf8($string, $charset_in);
1095
	//if(utf8_check($string)) // this is to much time-consuming
1096
		$string = utf8_umlauts_to_entities($string);
437
	$string = charset_to_utf8($string, $charset_in, false);
438
	//if(utf8_check($string)) // this check is to much time-consuming (this may fail only if AddDefaultCharset is set)
439
		$string = utf8_fast_umlauts_to_entities($string, false);
1097 440
	return($string);
1098 441
}
1099 442

  
trunk/wb/framework/charsets_table.php
392 392
);
393 393

  
394 394
// nicht enthalten &gt; &lt; &apos; &#39; &quot; &amp; &nbsp;
395
global $named_to_numbered_entities;
396
$named_to_numbered_entities=array(
397
	'&Aacute;'=>'&#193;','&aacute;'=>'&#225;',
398
	'&Acirc;'=>'&#194;','&acirc;'=>'&#226;','&acute;'=>'&#180;','&AElig;'=>'&#198;','&aelig;'=>'&#230;',
399
	'&Agrave;'=>'&#192;','&agrave;'=>'&#224;','&alefsym;'=>'&#8501;','&Alpha;'=>'&#913;','&alpha;'=>'&#945;',
400
	'&and;'=>'&#8743;','&ang;'=>'&#8736;','&Aring;'=>'&#197;','&aring;'=>'&#229;',
401
	'&asymp;'=>'&#8776;','&Atilde;'=>'&#195;','&atilde;'=>'&#227;','&Auml;'=>'&#196;','&auml;'=>'&#228;',
402
	'&bdquo;'=>'&#8222;','&Beta;'=>'&#914;','&beta;'=>'&#946;','&brvbar;'=>'&#166;','&bull;'=>'&#8226;',
403
	'&cap;'=>'&#8745;','&Ccedil;'=>'&#199;','&ccedil;'=>'&#231;','&cedil;'=>'&#184;','&cent;'=>'&#162;',
404
	'&Chi;'=>'&#935;','&chi;'=>'&#967;','&circ;'=>'&#710;','&clubs;'=>'&#9827;','&cong;'=>'&#8773;',
405
	'&copy;'=>'&#169;','&crarr;'=>'&#8629;','&cup;'=>'&#8746;','&curren;'=>'&#164;','&Dagger;'=>'&#8225;',
406
	'&dagger;'=>'&#8224;','&dArr;'=>'&#8659;','&darr;'=>'&#8595;','&deg;'=>'&#176;','&Delta;'=>'&#916;',
407
	'&delta;'=>'&#948;','&diams;'=>'&v#9830;','&divide;'=>'&#247;','&Eacute;'=>'&#201;','&eacute;'=>'&#233;',
408
	'&Ecirc;'=>'&#202;','&ecirc;'=>'&#234;','&Egrave;'=>'&#200;','&egrave;'=>'&#232;','&empty;'=>'&#8709;',
409
	'&emsp;'=>'&#8195;','&ensp;'=>'&#8194;','&Epsilon;'=>'&#917;','&epsilon;'=>'&#949;','&equiv;'=>'&#8801;',
410
	'&Eta;'=>'&#919;','&eta;'=>'&#951;','&ETH;'=>'&#208;','&eth;'=>'&#240;','&Euml;'=>'&#203;','&euml;'=>'&#235;',
411
	'&euro;'=>'&#8364;','&exist;'=>'&#8707;','&fnof;'=>'&#402;','&forall;'=>'&#8704;','&frac12;'=>'&#189;',
412
	'&frac14;'=>'&#188;','&frac34;'=>'&#190;','&frasl;'=>'&#8260;','&Gamma;'=>'&#915;','&gamma;'=>'&#947;',
413
	'&ge;'=>'&#8805;','&hArr;'=>'&#8660;','&harr;'=>'&#8596;','&hearts;'=>'&#9829;',
414
	'&hellip;'=>'&#8230;','&Iacute;'=>'&#205;','&iacute;'=>'&#237;','&Icirc;'=>'&#206;','&icirc;'=>'&#238;',
415
	'&iexcl;'=>'&#161;','&Igrave;'=>'&#204;','&igrave;'=>'&#236;','&image;'=>'&#8465;','&infin;'=>'&#8734;',
416
	'&int;'=>'&#8747;','&Iota;'=>'&#921;','&iota;'=>'&#953;','&iquest;'=>'&#191;','&isin;'=>'&#8712;',
417
	'&Iuml;'=>'&#207;','&iuml;'=>'&#239;','&Kappa;'=>'&#922;','&kappa;'=>'&#954;','&Lambda;'=>'&#923;',
418
	'&lambda;'=>'&#955;','&lang;'=>'&#9001;','&laquo;'=>'&#171;','&lArr;'=>'&#8656;','&larr;'=>'&#8592;',
419
	'&lceil;'=>'&#8968;','&ldquo;'=>'&#8220;','&le;'=>'&#8804;','&lfloor;'=>'&#8970;','&lowast;'=>'&#8727;',
420
	'&loz;'=>'&#9674;','&lrm;'=>'&#8206;','&lsaquo;'=>'&#8249;','&lsquo;'=>'&#8216;',
421
	'&macr;'=>'&#175;','&mdash;'=>'&#8212;','&micro;'=>'&#181;','&middot;'=>'&#183;','&minus;'=>'&#8722;',
422
	'&Mu;'=>'&#924;','&mu;'=>'&#956;','&nabla;'=>'&#8711;','&ndash;'=>'&#8211;',
423
	'&ne;'=>'&#8800;','&ni;'=>'&#8715;','&not;'=>'&#172;','&notin;'=>'&#8713;','&nsub;'=>'&#8836;',
424
	'&Ntilde;'=>'&#209;','&ntilde;'=>'&#241;','&Nu;'=>'&#925;','&nu;'=>'&#957;','&Oacute;'=>'&#211;',
425
	'&oacute;'=>'&#243;','&Ocirc;'=>'&#212;','&ocirc;'=>'&#244;','&OElig;'=>'&#338;','&oelig;'=>'&#339;',
426
	'&Ograve;'=>'&#210;','&ograve;'=>'&#242;','&oline;'=>'&#8254;','&Omega;'=>'&#937;','&omega;'=>'&#969;',
427
	'&Omicron;'=>'&#927;','&omicron;'=>'&#959;','&oplus;'=>'&#8853;','&or;'=>'&#8744;','&ordf;'=>'&#170;',
428
	'&ordm;'=>'&#186;','&Oslash;'=>'&#216;','&oslash;'=>'&#248;','&Otilde;'=>'&#213;','&otilde;'=>'&#245;',
429
	'&otimes;'=>'&#8855;','&Ouml;'=>'&#214;','&ouml;'=>'&#246;','&para;'=>'&#182;','&part;'=>'&#8706;',
430
	'&permil;'=>'&#8240;','&perp;'=>'&#8869;','&Phi;'=>'&#934;','&phi;'=>'&#966;','&Pi;'=>'&#928;',
431
	'&pi;'=>'&#960;','&piv;'=>'&#982;','&plusmn;'=>'&#177;','&pound;'=>'&#163;','&Prime;'=>'&#8243;',
432
	'&prime;'=>'&#8242;','&prod;'=>'&#8719;','&prop;'=>'&#8733;','&Psi;'=>'&#936;','&psi;'=>'&#968;',
433
	'&radic;'=>'&#8730;','&rang;'=>'&#9002;','&raquo;'=>'&#187;','&rArr;'=>'&#8658;',
434
	'&rarr;'=>'&#8594;','&rceil;'=>'&#8969;','&rdquo;'=>'&#8221;','&real;'=>'&#8476;','&reg;'=>'&#174;',
435
	'&rfloor;'=>'&#8971;','&Rho;'=>'&#929;','&rho;'=>'&#961;','&rlm;'=>'&#8207;','&rsaquo;'=>'&#8250;',
436
	'&rsquo;'=>'&#8217;','&sbquo;'=>'&#8218;','&Scaron;'=>'&#352;','&scaron;'=>'&#353;','&sdot;'=>'&#8901;',
437
	'&sect;'=>'&#167;','&shy;'=>'&#173;','&Sigma;'=>'&#931;','&sigma;'=>'&#963;','&sigmaf;'=>'&#962;',
438
	'&sim;'=>'&#8764;','&spades;'=>'&#9824;','&sub;'=>'&#8834;','&sube;'=>'&#8838;','&sum;'=>'&#8721;',
439
	'&sup;'=>'&#8835;','&sup1;'=>'&#185;','&sup2;'=>'&#178;','&sup3;'=>'&#179;','&supe;'=>'&#8839;',
440
	'&szlig;'=>'&#223;','&Tau;'=>'&#932;','&tau;'=>'&#964;','&there4;'=>'&#8756;','&Theta;'=>'&#920;',
441
	'&theta;'=>'&#952;','&thetasym;'=>'&#977;','&thinsp;'=>'&#8201;','&THORN;'=>'&#222;','&thorn;'=>'&#254;',
442
	'&tilde;'=>'&#732;','&times;'=>'&#215;','&trade;'=>'&#8482;','&Uacute;'=>'&#218;','&uacute;'=>'&#250;',
443
	'&uArr;'=>'&#8657;','&uarr;'=>'&#8593;','&Ucirc;'=>'&#219;','&ucirc;'=>'&#251;','&Ugrave;'=>'&#217;',
444
	'&ugrave;'=>'&#249;','&uml;'=>'&#168;','&upsih;'=>'&#978;','&Upsilon;'=>'&#933;','&upsilon;'=>'&#965;',
445
	'&Uuml;'=>'&#220;','&uuml;'=>'&#252;','&weierp;'=>'&#8472;','&Xi;'=>'&#926;','&xi;'=>'&#958;',
446
	'&Yacute;'=>'&#221;','&yacute;'=>'&#253;','&yen;'=>'&#165;','&Yuml;'=>'&#376;','&yuml;'=>'&#255;',
447
	'&Zeta;'=>'&#918;','&zeta;'=>'&#950;','&zwj;'=>'&#8205;','&zwnj;'=>'&#8204;'
395
global $named_entities;
396
$named_entities=array(
397
'&Aacute;','&aacute;','&Acirc;','&acirc;','&acute;','&AElig;','&aelig;','&Agrave;','&agrave;','&alefsym;',
398
'&Alpha;','&alpha;','&and;','&ang;','&Aring;','&aring;','&asymp;','&Atilde;','&atilde;','&Auml;',
399
'&auml;','&bdquo;','&Beta;','&beta;','&brvbar;','&bull;','&cap;','&Ccedil;','&ccedil;','&cedil;',
400
'&cent;','&Chi;','&chi;','&circ;','&clubs;','&cong;','&copy;','&crarr;','&cup;','&curren;',
401
'&Dagger;','&dagger;','&dArr;','&darr;','&deg;','&Delta;','&delta;','&diams;','&divide;','&Eacute;',
402
'&eacute;','&Ecirc;','&ecirc;','&Egrave;','&egrave;','&empty;','&emsp;','&ensp;','&Epsilon;','&epsilon;',
403
'&equiv;','&Eta;','&eta;','&ETH;','&eth;','&Euml;','&euml;','&euro;','&exist;','&fnof;',
404
'&forall;','&frac12;','&frac14;','&frac34;','&frasl;','&Gamma;','&gamma;','&ge;','&hArr;','&harr;',
405
'&hearts;','&hellip;','&Iacute;','&iacute;','&Icirc;','&icirc;','&iexcl;','&Igrave;','&igrave;','&image;',
406
'&infin;','&int;','&Iota;','&iota;','&iquest;','&isin;','&Iuml;','&iuml;','&Kappa;','&kappa;',
407
'&Lambda;','&lambda;','&lang;','&laquo;','&lArr;','&larr;','&lceil;','&ldquo;','&le;','&lfloor;',
408
'&lowast;','&loz;','&lrm;','&lsaquo;','&lsquo;','&macr;','&mdash;','&micro;','&middot;','&minus;',
409
'&Mu;','&mu;','&nabla;','&ndash;','&ne;','&ni;','&not;','&notin;','&nsub;','&Ntilde;',
410
'&ntilde;','&Nu;','&nu;','&Oacute;','&oacute;','&Ocirc;','&ocirc;','&OElig;','&oelig;','&Ograve;',
411
'&ograve;','&oline;','&Omega;','&omega;','&Omicron;','&omicron;','&oplus;','&or;','&ordf;','&ordm;',
412
'&Oslash;','&oslash;','&Otilde;','&otilde;','&otimes;','&Ouml;','&ouml;','&para;','&part;','&permil;',
413
'&perp;','&Phi;','&phi;','&Pi;','&pi;','&piv;','&plusmn;','&pound;','&Prime;','&prime;',
414
'&prod;','&prop;','&Psi;','&psi;','&radic;','&rang;','&raquo;','&rArr;','&rarr;','&rceil;',
415
'&rdquo;','&real;','&reg;','&rfloor;','&Rho;','&rho;','&rlm;','&rsaquo;','&rsquo;','&sbquo;',
416
'&Scaron;','&scaron;','&sdot;','&sect;','&shy;','&Sigma;','&sigma;','&sigmaf;','&sim;','&spades;',
417
'&sub;','&sube;','&sum;','&sup;','&sup1;','&sup2;','&sup3;','&supe;','&szlig;','&Tau;',
418
'&tau;','&there4;','&Theta;','&theta;','&thetasym;','&thinsp;','&THORN;','&thorn;','&tilde;','&times;',
419
'&trade;','&Uacute;','&uacute;','&uArr;','&uarr;','&Ucirc;','&ucirc;','&Ugrave;','&ugrave;','&uml;',
420
'&upsih;','&Upsilon;','&upsilon;','&Uuml;','&uuml;','&weierp;','&Xi;','&xi;','&Yacute;','&yacute;',
421
'&yen;','&Yuml;','&yuml;','&Zeta;','&zeta;','&zwj;','&zwnj;'
448 422
);
423

  
449 424
// nicht enthalten &gt; &lt; &apos; &#39; &quot; &amp; &nbsp;
450
global $numbered_to_named_entities;
451
$numbered_to_named_entities=array(
452
	'&#193;'=>'&Aacute;','&#225;'=>'&aacute;','&#194;'=>'&Acirc;','&#226;'=>'&acirc;','&#180;'=>'&acute;',
453
	'&#198;'=>'&AElig;','&#230;'=>'&aelig;','&#192;'=>'&Agrave;','&#224;'=>'&agrave;','&#8501;'=>'&alefsym;',
454
	'&#913;'=>'&Alpha;','&#945;'=>'&alpha;','&#8743;'=>'&and;','&#8736;'=>'&ang;',
455
	'&#197;'=>'&Aring;','&#229;'=>'&aring;','&#8776;'=>'&asymp;','&#195;'=>'&Atilde;',
456
	'&#227;'=>'&atilde;','&#196;'=>'&Auml;','&#228;'=>'&auml;','&#8222;'=>'&bdquo;','&#914;'=>'&Beta;',
457
	'&#946;'=>'&beta;','&#166;'=>'&brvbar;','&#8226;'=>'&bull;','&#8745;'=>'&cap;','&#199;'=>'&Ccedil;',
458
	'&#231;'=>'&ccedil;','&#184;'=>'&cedil;','&#162;'=>'&cent;','&#935;'=>'&Chi;','&#967;'=>'&chi;',
459
	'&#710;'=>'&circ;','&#9827;'=>'&clubs;','&#8773;'=>'&cong;','&#169;'=>'&copy;','&#8629;'=>'&crarr;',
460
	'&#8746;'=>'&cup;','&#164;'=>'&curren;','&#8225;'=>'&Dagger;','&#8224;'=>'&dagger;','&#8659;'=>'&dArr;',
461
	'&#8595;'=>'&darr;','&#176;'=>'&deg;','&#916;'=>'&Delta;','&#948;'=>'&delta;','&v#9830;'=>'&diams;',
462
	'&#247;'=>'&divide;','&#201;'=>'&Eacute;','&#233;'=>'&eacute;','&#202;'=>'&Ecirc;','&#234;'=>'&ecirc;',
463
	'&#200;'=>'&Egrave;','&#232;'=>'&egrave;','&#8709;'=>'&empty;','&#8195;'=>'&emsp;','&#8194;'=>'&ensp;',
464
	'&#917;'=>'&Epsilon;','&#949;'=>'&epsilon;','&#8801;'=>'&equiv;','&#919;'=>'&Eta;','&#951;'=>'&eta;',
465
	'&#208;'=>'&ETH;','&#240;'=>'&eth;','&#203;'=>'&Euml;','&#235;'=>'&euml;','&#8364;'=>'&euro;',
466
	'&#8707;'=>'&exist;','&#402;'=>'&fnof;','&#8704;'=>'&forall;','&#189;'=>'&frac12;','&#188;'=>'&frac14;',
467
	'&#190;'=>'&frac34;','&#8260;'=>'&frasl;','&#915;'=>'&Gamma;','&#947;'=>'&gamma;','&#8805;'=>'&ge;',
468
	'&#8660;'=>'&hArr;','&#8596;'=>'&harr;','&#9829;'=>'&hearts;','&#8230;'=>'&hellip;',
469
	'&#205;'=>'&Iacute;','&#237;'=>'&iacute;','&#206;'=>'&Icirc;','&#238;'=>'&icirc;','&#161;'=>'&iexcl;',
470
	'&#204;'=>'&Igrave;','&#236;'=>'&igrave;','&#8465;'=>'&image;','&#8734;'=>'&infin;','&#8747;'=>'&int;',
471
	'&#921;'=>'&Iota;','&#953;'=>'&iota;','&#191;'=>'&iquest;','&#8712;'=>'&isin;','&#207;'=>'&Iuml;',
472
	'&#239;'=>'&iuml;','&#922;'=>'&Kappa;','&#954;'=>'&kappa;','&#923;'=>'&Lambda;','&#955;'=>'&lambda;',
473
	'&#9001;'=>'&lang;','&#171;'=>'&laquo;','&#8656;'=>'&lArr;','&#8592;'=>'&larr;','&#8968;'=>'&lceil;',
474
	'&#8220;'=>'&ldquo;','&#8804;'=>'&le;','&#8970;'=>'&lfloor;','&#8727;'=>'&lowast;','&#9674;'=>'&loz;',
475
	'&#8206;'=>'&lrm;','&#8249;'=>'&lsaquo;','&#8216;'=>'&lsquo;','&#175;'=>'&macr;',
476
	'&#8212;'=>'&mdash;','&#181;'=>'&micro;','&#183;'=>'&middot;','&#8722;'=>'&minus;','&#924;'=>'&Mu;',
477
	'&#956;'=>'&mu;','&#8711;'=>'&nabla;','&#8211;'=>'&ndash;','&#8800;'=>'&ne;',
478
	'&#8715;'=>'&ni;','&#172;'=>'&not;','&#8713;'=>'&notin;','&#8836;'=>'&nsub;','&#209;'=>'&Ntilde;',
479
	'&#241;'=>'&ntilde;','&#925;'=>'&Nu;','&#957;'=>'&nu;','&#211;'=>'&Oacute;','&#243;'=>'&oacute;',
480
	'&#212;'=>'&Ocirc;','&#244;'=>'&ocirc;','&#338;'=>'&OElig;','&#339;'=>'&oelig;','&#210;'=>'&Ograve;',
481
	'&#242;'=>'&ograve;','&#8254;'=>'&oline;','&#937;'=>'&Omega;','&#969;'=>'&omega;','&#927;'=>'&Omicron;',
482
	'&#959;'=>'&omicron;','&#8853;'=>'&oplus;','&#8744;'=>'&or;','&#170;'=>'&ordf;','&#186;'=>'&ordm;',
483
	'&#216;'=>'&Oslash;','&#248;'=>'&oslash;','&#213;'=>'&Otilde;','&#245;'=>'&otilde;','&#8855;'=>'&otimes;',
484
	'&#214;'=>'&Ouml;','&#246;'=>'&ouml;','&#182;'=>'&para;','&#8706;'=>'&part;','&#8240;'=>'&permil;',
485
	'&#8869;'=>'&perp;','&#934;'=>'&Phi;','&#966;'=>'&phi;','&#928;'=>'&Pi;','&#960;'=>'&pi;','&#982;'=>'&piv;',
486
	'&#177;'=>'&plusmn;','&#163;'=>'&pound;','&#8243;'=>'&Prime;','&#8242;'=>'&prime;','&#8719;'=>'&prod;',
487
	'&#8733;'=>'&prop;','&#936;'=>'&Psi;','&#968;'=>'&psi;','&#8730;'=>'&radic;',
488
	'&#9002;'=>'&rang;','&#187;'=>'&raquo;','&#8658;'=>'&rArr;','&#8594;'=>'&rarr;','&#8969;'=>'&rceil;',
489
	'&#8221;'=>'&rdquo;','&#8476;'=>'&real;','&#174;'=>'&reg;','&#8971;'=>'&rfloor;','&#929;'=>'&Rho;',
490
	'&#961;'=>'&rho;','&#8207;'=>'&rlm;','&#8250;'=>'&rsaquo;','&#8217;'=>'&rsquo;','&#8218;'=>'&sbquo;',
491
	'&#352;'=>'&Scaron;','&#353;'=>'&scaron;','&#8901;'=>'&sdot;','&#167;'=>'&sect;','&#173;'=>'&shy;',
492
	'&#931;'=>'&Sigma;','&#963;'=>'&sigma;','&#962;'=>'&sigmaf;','&#8764;'=>'&sim;','&#9824;'=>'&spades;',
493
	'&#8834;'=>'&sub;','&#8838;'=>'&sube;','&#8721;'=>'&sum;','&#8835;'=>'&sup;','&#185;'=>'&sup1;',
494
	'&#178;'=>'&sup2;','&#179;'=>'&sup3;','&#8839;'=>'&supe;','&#223;'=>'&szlig;','&#932;'=>'&Tau;',
495
	'&#964;'=>'&tau;','&#8756;'=>'&there4;','&#920;'=>'&Theta;','&#952;'=>'&theta;','&#977;'=>'&thetasym;',
496
	'&#8201;'=>'&thinsp;','&#222;'=>'&THORN;','&#254;'=>'&thorn;','&#732;'=>'&tilde;','&#215;'=>'&times;',
497
	'&#8482;'=>'&trade;','&#218;'=>'&Uacute;','&#250;'=>'&uacute;','&#8657;'=>'&uArr;','&#8593;'=>'&uarr;',
498
	'&#219;'=>'&Ucirc;','&#251;'=>'&ucirc;','&#217;'=>'&Ugrave;','&#249;'=>'&ugrave;','&#168;'=>'&uml;',
499
	'&#978;'=>'&upsih;','&#933;'=>'&Upsilon;','&#965;'=>'&upsilon;','&#220;'=>'&Uuml;','&#252;'=>'&uuml;',
500
	'&#8472;'=>'&weierp;','&#926;'=>'&Xi;','&#958;'=>'&xi;','&#221;'=>'&Yacute;','&#253;'=>'&yacute;',
501
	'&#165;'=>'&yen;','&#376;'=>'&Yuml;','&#255;'=>'&yuml;','&#918;'=>'&Zeta;','&#950;'=>'&zeta;','&#8205;'=>'&zwj;',
502
	'&#8204;'=>'&zwnj;'
425
global $numbered_entities;
426
$numbered_entities=array(
427
'&#193;','&#225;','&#194;','&#226;','&#180;','&#198;','&#230;','&#192;','&#224;','&#8501;',
428
'&#913;','&#945;','&#8743;','&#8736;','&#197;','&#229;','&#8776;','&#195;','&#227;','&#196;',
429
'&#228;','&#8222;','&#914;','&#946;','&#166;','&#8226;','&#8745;','&#199;','&#231;','&#184;',
430
'&#162;','&#935;','&#967;','&#710;','&#9827;','&#8773;','&#169;','&#8629;','&#8746;','&#164;',
431
'&#8225;','&#8224;','&#8659;','&#8595;','&#176;','&#916;','&#948;','&#9830;','&#247;','&#201;',
432
'&#233;','&#202;','&#234;','&#200;','&#232;','&#8709;','&#8195;','&#8194;','&#917;','&#949;',
433
'&#8801;','&#919;','&#951;','&#208;','&#240;','&#203;','&#235;','&#8364;','&#8707;','&#402;',
434
'&#8704;','&#189;','&#188;','&#190;','&#8260;','&#915;','&#947;','&#8805;','&#8660;','&#8596;',
435
'&#9829;','&#8230;','&#205;','&#237;','&#206;','&#238;','&#161;','&#204;','&#236;','&#8465;',
436
'&#8734;','&#8747;','&#921;','&#953;','&#191;','&#8712;','&#207;','&#239;','&#922;','&#954;',
437
'&#923;','&#955;','&#9001;','&#171;','&#8656;','&#8592;','&#8968;','&#8220;','&#8804;','&#8970;',
438
'&#8727;','&#9674;','&#8206;','&#8249;','&#8216;','&#175;','&#8212;','&#181;','&#183;','&#8722;',
439
'&#924;','&#956;','&#8711;','&#8211;','&#8800;','&#8715;','&#172;','&#8713;','&#8836;','&#209;',
440
'&#241;','&#925;','&#957;','&#211;','&#243;','&#212;','&#244;','&#338;','&#339;','&#210;','&#242;',
441
'&#8254;','&#937;','&#969;','&#927;','&#959;','&#8853;','&#8744;','&#170;','&#186;','&#216;','&#248;',
442
'&#213;','&#245;','&#8855;','&#214;','&#246;','&#182;','&#8706;','&#8240;','&#8869;','&#934;','&#966;',
443
'&#928;','&#960;','&#982;','&#177;','&#163;','&#8243;','&#8242;','&#8719;','&#8733;','&#936;','&#968;',
444
'&#8730;','&#9002;','&#187;','&#8658;','&#8594;','&#8969;','&#8221;','&#8476;','&#174;','&#8971;','&#929;',
445
'&#961;','&#8207;','&#8250;','&#8217;','&#8218;','&#352;','&#353;','&#8901;','&#167;','&#173;','&#931;',
446
'&#963;','&#962;','&#8764;','&#9824;','&#8834;','&#8838;','&#8721;','&#8835;','&#185;','&#178;','&#179;',
447
'&#8839;','&#223;','&#932;','&#964;','&#8756;','&#920;','&#952;','&#977;','&#8201;','&#222;','&#254;',
448
'&#732;','&#215;','&#8482;','&#218;','&#250;','&#8657;','&#8593;','&#219;','&#251;','&#217;','&#249;',
449
'&#168;','&#978;','&#933;','&#965;','&#220;','&#252;','&#8472;','&#926;','&#958;','&#221;','&#253;',
450
'&#165;','&#376;','&#255;','&#918;','&#950;','&#8205;','&#8204;'
503 451
);
504 452

  
505 453
/*
......
514 462
 * from thorn, Jan. 2008
515 463
 */
516 464

  
517
// only needed if no mb_string available
518
// extended - thorn
519
if(!UTF8_MBSTRING){
520
  /**
521
   * UTF-8 Case lookup table
522
   *
523
   * This lookuptable defines the upper case letters to their correspponding
524
   * lower case letter in UTF-8
525
   *
526
   * @author Andreas Gohr <andi@splitbrain.org>
527
   * @author thorn <thorn@nettest.thekk.de>
528
   */
529
	global $UTF8_LOWER_TO_UPPER;
530
	$UTF8_LOWER_TO_UPPER = array(
531
		"\x61"=>"\x41","\x62"=>"\x42","\x63"=>"\x43","\x64"=>"\x44",
532
		"\x65"=>"\x45","\x66"=>"\x46","\x67"=>"\x47","\x68"=>"\x48",
533
		"\x69"=>"\x49","\x6a"=>"\x4a","\x6b"=>"\x4b","\x6c"=>"\x4c",
534
		"\x6d"=>"\x4d","\x6e"=>"\x4e","\x6f"=>"\x4f","\x70"=>"\x50",
535
		"\x71"=>"\x51","\x72"=>"\x52","\x73"=>"\x53","\x74"=>"\x54",
536
		"\x75"=>"\x55","\x76"=>"\x56","\x77"=>"\x57","\x78"=>"\x58",
537
		"\x79"=>"\x59","\x7a"=>"\x5a","\xc2\xb5"=>"\xce\x9c","\xc3\xa0"=>"\xc3\x80",
538
		"\xc3\xa1"=>"\xc3\x81","\xc3\xa2"=>"\xc3\x82","\xc3\xa3"=>"\xc3\x83","\xc3\xa4"=>"\xc3\x84",
539
		"\xc3\xa5"=>"\xc3\x85","\xc3\xa6"=>"\xc3\x86","\xc3\xa7"=>"\xc3\x87","\xc3\xa8"=>"\xc3\x88",
540
		"\xc3\xa9"=>"\xc3\x89","\xc3\xaa"=>"\xc3\x8a","\xc3\xab"=>"\xc3\x8b","\xc3\xac"=>"\xc3\x8c",
541
		"\xc3\xad"=>"\xc3\x8d","\xc3\xae"=>"\xc3\x8e","\xc3\xaf"=>"\xc3\x8f","\xc3\xb0"=>"\xc3\x90",
542
		"\xc3\xb1"=>"\xc3\x91","\xc3\xb2"=>"\xc3\x92","\xc3\xb3"=>"\xc3\x93","\xc3\xb4"=>"\xc3\x94",
543
		"\xc3\xb5"=>"\xc3\x95","\xc3\xb6"=>"\xc3\x96","\xc3\xb8"=>"\xc3\x98","\xc3\xb9"=>"\xc3\x99",
544
		"\xc3\xba"=>"\xc3\x9a","\xc3\xbb"=>"\xc3\x9b","\xc3\xbc"=>"\xc3\x9c","\xc3\xbd"=>"\xc3\x9d",
545
		"\xc3\xbe"=>"\xc3\x9e","\xc3\xbf"=>"\xc5\xb8","\xc4\x81"=>"\xc4\x80","\xc4\x83"=>"\xc4\x82",
546
		"\xc4\x85"=>"\xc4\x84","\xc4\x87"=>"\xc4\x86","\xc4\x89"=>"\xc4\x88","\xc4\x8b"=>"\xc4\x8a",
547
		"\xc4\x8d"=>"\xc4\x8c","\xc4\x8f"=>"\xc4\x8e","\xc4\x91"=>"\xc4\x90","\xc4\x93"=>"\xc4\x92",
548
		"\xc4\x95"=>"\xc4\x94","\xc4\x97"=>"\xc4\x96","\xc4\x99"=>"\xc4\x98","\xc4\x9b"=>"\xc4\x9a",
549
		"\xc4\x9d"=>"\xc4\x9c","\xc4\x9f"=>"\xc4\x9e","\xc4\xa1"=>"\xc4\xa0","\xc4\xa3"=>"\xc4\xa2",
550
		"\xc4\xa5"=>"\xc4\xa4","\xc4\xa7"=>"\xc4\xa6","\xc4\xa9"=>"\xc4\xa8","\xc4\xab"=>"\xc4\xaa",
551
		"\xc4\xad"=>"\xc4\xac","\xc4\xaf"=>"\xc4\xae","\xc4\xb1"=>"\x49","\xc4\xb3"=>"\xc4\xb2",
552
		"\xc4\xb5"=>"\xc4\xb4","\xc4\xb7"=>"\xc4\xb6","\xc4\xba"=>"\xc4\xb9","\xc4\xbc"=>"\xc4\xbb",
553
		"\xc4\xbe"=>"\xc4\xbd","\xc5\x80"=>"\xc4\xbf","\xc5\x82"=>"\xc5\x81","\xc5\x84"=>"\xc5\x83",
554
		"\xc5\x86"=>"\xc5\x85","\xc5\x88"=>"\xc5\x87","\xc5\x8b"=>"\xc5\x8a","\xc5\x8d"=>"\xc5\x8c",
555
		"\xc5\x8f"=>"\xc5\x8e","\xc5\x91"=>"\xc5\x90","\xc5\x93"=>"\xc5\x92","\xc5\x95"=>"\xc5\x94",
556
		"\xc5\x97"=>"\xc5\x96","\xc5\x99"=>"\xc5\x98","\xc5\x9b"=>"\xc5\x9a","\xc5\x9d"=>"\xc5\x9c",
557
		"\xc5\x9f"=>"\xc5\x9e","\xc5\xa1"=>"\xc5\xa0","\xc5\xa3"=>"\xc5\xa2","\xc5\xa5"=>"\xc5\xa4",
558
		"\xc5\xa7"=>"\xc5\xa6","\xc5\xa9"=>"\xc5\xa8","\xc5\xab"=>"\xc5\xaa","\xc5\xad"=>"\xc5\xac",
559
		"\xc5\xaf"=>"\xc5\xae","\xc5\xb1"=>"\xc5\xb0","\xc5\xb3"=>"\xc5\xb2","\xc5\xb5"=>"\xc5\xb4",
560
		"\xc5\xb7"=>"\xc5\xb6","\xc5\xba"=>"\xc5\xb9","\xc5\xbc"=>"\xc5\xbb","\xc5\xbe"=>"\xc5\xbd",
561
		"\xc5\xbf"=>"\x53","\xc6\x83"=>"\xc6\x82","\xc6\x85"=>"\xc6\x84","\xc6\x88"=>"\xc6\x87",
562
		"\xc6\x8c"=>"\xc6\x8b","\xc6\x92"=>"\xc6\x91","\xc6\x95"=>"\xc7\xb6","\xc6\x99"=>"\xc6\x98",
563
		"\xc6\xa1"=>"\xc6\xa0","\xc6\xa3"=>"\xc6\xa2","\xc6\xa5"=>"\xc6\xa4","\xc6\xa8"=>"\xc6\xa7",
564
		"\xc6\xad"=>"\xc6\xac","\xc6\xb0"=>"\xc6\xaf","\xc6\xb4"=>"\xc6\xb3","\xc6\xb6"=>"\xc6\xb5",
565
		"\xc6\xb9"=>"\xc6\xb8","\xc6\xbd"=>"\xc6\xbc","\xc6\xbf"=>"\xc7\xb7","\xc7\x85"=>"\xc7\x84",
566
		"\xc7\x86"=>"\xc7\x84","\xc7\x88"=>"\xc7\x87","\xc7\x89"=>"\xc7\x87","\xc7\x8b"=>"\xc7\x8a",
567
		"\xc7\x8c"=>"\xc7\x8a","\xc7\x8e"=>"\xc7\x8d","\xc7\x90"=>"\xc7\x8f","\xc7\x92"=>"\xc7\x91",
568
		"\xc7\x94"=>"\xc7\x93","\xc7\x96"=>"\xc7\x95","\xc7\x98"=>"\xc7\x97","\xc7\x9a"=>"\xc7\x99",
569
		"\xc7\x9c"=>"\xc7\x9b","\xc7\x9d"=>"\xc6\x8e","\xc7\x9f"=>"\xc7\x9e","\xc7\xa1"=>"\xc7\xa0",
570
		"\xc7\xa3"=>"\xc7\xa2","\xc7\xa5"=>"\xc7\xa4","\xc7\xa7"=>"\xc7\xa6","\xc7\xa9"=>"\xc7\xa8",
571
		"\xc7\xab"=>"\xc7\xaa","\xc7\xad"=>"\xc7\xac","\xc7\xaf"=>"\xc7\xae","\xc7\xb2"=>"\xc7\xb1",
572
		"\xc7\xb3"=>"\xc7\xb1","\xc7\xb5"=>"\xc7\xb4","\xc7\xb9"=>"\xc7\xb8","\xc7\xbb"=>"\xc7\xba",
573
		"\xc7\xbd"=>"\xc7\xbc","\xc7\xbf"=>"\xc7\xbe","\xc8\x81"=>"\xc8\x80","\xc8\x83"=>"\xc8\x82",
574
		"\xc8\x85"=>"\xc8\x84","\xc8\x87"=>"\xc8\x86","\xc8\x89"=>"\xc8\x88","\xc8\x8b"=>"\xc8\x8a",
575
		"\xc8\x8d"=>"\xc8\x8c","\xc8\x8f"=>"\xc8\x8e","\xc8\x91"=>"\xc8\x90","\xc8\x93"=>"\xc8\x92",
576
		"\xc8\x95"=>"\xc8\x94","\xc8\x97"=>"\xc8\x96","\xc8\x99"=>"\xc8\x98","\xc8\x9b"=>"\xc8\x9a",
577
		"\xc8\x9d"=>"\xc8\x9c","\xc8\x9f"=>"\xc8\x9e","\xc8\xa3"=>"\xc8\xa2","\xc8\xa5"=>"\xc8\xa4",
578
		"\xc8\xa7"=>"\xc8\xa6","\xc8\xa9"=>"\xc8\xa8","\xc8\xab"=>"\xc8\xaa","\xc8\xad"=>"\xc8\xac",
579
		"\xc8\xaf"=>"\xc8\xae","\xc8\xb1"=>"\xc8\xb0","\xc8\xb3"=>"\xc8\xb2","\xc9\x93"=>"\xc6\x81",
580
		"\xc9\x94"=>"\xc6\x86","\xc9\x96"=>"\xc6\x89","\xc9\x97"=>"\xc6\x8a","\xc9\x99"=>"\xc6\x8f",
581
		"\xc9\x9b"=>"\xc6\x90","\xc9\xa0"=>"\xc6\x93","\xc9\xa3"=>"\xc6\x94","\xc9\xa8"=>"\xc6\x97",
582
		"\xc9\xa9"=>"\xc6\x96","\xc9\xaf"=>"\xc6\x9c","\xc9\xb2"=>"\xc6\x9d","\xc9\xb5"=>"\xc6\x9f",
583
		"\xca\x80"=>"\xc6\xa6","\xca\x83"=>"\xc6\xa9","\xca\x88"=>"\xc6\xae","\xca\x8a"=>"\xc6\xb1",
584
		"\xca\x8b"=>"\xc6\xb2","\xca\x92"=>"\xc6\xb7","\xcd\x85"=>"\xce\x99","\xce\xac"=>"\xce\x86",
585
		"\xce\xad"=>"\xce\x88","\xce\xae"=>"\xce\x89","\xce\xaf"=>"\xce\x8a","\xce\xb1"=>"\xce\x91",
586
		"\xce\xb2"=>"\xce\x92","\xce\xb3"=>"\xce\x93","\xce\xb4"=>"\xce\x94","\xce\xb5"=>"\xce\x95",
587
		"\xce\xb6"=>"\xce\x96","\xce\xb7"=>"\xce\x97","\xce\xb8"=>"\xce\x98","\xce\xb9"=>"\xce\x99",
588
		"\xce\xba"=>"\xce\x9a","\xce\xbb"=>"\xce\x9b","\xce\xbc"=>"\xce\x9c","\xce\xbd"=>"\xce\x9d",
589
		"\xce\xbe"=>"\xce\x9e","\xce\xbf"=>"\xce\x9f","\xcf\x80"=>"\xce\xa0","\xcf\x81"=>"\xce\xa1",
590
		"\xcf\x82"=>"\xce\xa3","\xcf\x83"=>"\xce\xa3","\xcf\x84"=>"\xce\xa4","\xcf\x85"=>"\xce\xa5",
591
		"\xcf\x86"=>"\xce\xa6","\xcf\x87"=>"\xce\xa7","\xcf\x88"=>"\xce\xa8","\xcf\x89"=>"\xce\xa9",
592
		"\xcf\x8a"=>"\xce\xaa","\xcf\x8b"=>"\xce\xab","\xcf\x8c"=>"\xce\x8c","\xcf\x8d"=>"\xce\x8e",
593
		"\xcf\x8e"=>"\xce\x8f","\xcf\x90"=>"\xce\x92","\xcf\x91"=>"\xce\x98","\xcf\x95"=>"\xce\xa6",
594
		"\xcf\x96"=>"\xce\xa0","\xcf\x9b"=>"\xcf\x9a","\xcf\x9d"=>"\xcf\x9c","\xcf\x9f"=>"\xcf\x9e",
595
		"\xcf\xa1"=>"\xcf\xa0","\xcf\xa3"=>"\xcf\xa2","\xcf\xa5"=>"\xcf\xa4","\xcf\xa7"=>"\xcf\xa6",
596
		"\xcf\xa9"=>"\xcf\xa8","\xcf\xab"=>"\xcf\xaa","\xcf\xad"=>"\xcf\xac","\xcf\xaf"=>"\xcf\xae",
597
		"\xcf\xb0"=>"\xce\x9a","\xcf\xb1"=>"\xce\xa1","\xcf\xb2"=>"\xce\xa3","\xcf\xb5"=>"\xce\x95",
598
		"\xd0\xb0"=>"\xd0\x90","\xd0\xb1"=>"\xd0\x91","\xd0\xb2"=>"\xd0\x92","\xd0\xb3"=>"\xd0\x93",
599
		"\xd0\xb4"=>"\xd0\x94","\xd0\xb5"=>"\xd0\x95","\xd0\xb6"=>"\xd0\x96","\xd0\xb7"=>"\xd0\x97",
600
		"\xd0\xb8"=>"\xd0\x98","\xd0\xb9"=>"\xd0\x99","\xd0\xba"=>"\xd0\x9a","\xd0\xbb"=>"\xd0\x9b",
601
		"\xd0\xbc"=>"\xd0\x9c","\xd0\xbd"=>"\xd0\x9d","\xd0\xbe"=>"\xd0\x9e","\xd0\xbf"=>"\xd0\x9f",
602
		"\xd1\x80"=>"\xd0\xa0","\xd1\x81"=>"\xd0\xa1","\xd1\x82"=>"\xd0\xa2","\xd1\x83"=>"\xd0\xa3",
603
		"\xd1\x84"=>"\xd0\xa4","\xd1\x85"=>"\xd0\xa5","\xd1\x86"=>"\xd0\xa6","\xd1\x87"=>"\xd0\xa7",
604
		"\xd1\x88"=>"\xd0\xa8","\xd1\x89"=>"\xd0\xa9","\xd1\x8a"=>"\xd0\xaa","\xd1\x8b"=>"\xd0\xab",
605
		"\xd1\x8c"=>"\xd0\xac","\xd1\x8d"=>"\xd0\xad","\xd1\x8e"=>"\xd0\xae","\xd1\x8f"=>"\xd0\xaf",
606
		"\xd1\x90"=>"\xd0\x80","\xd1\x91"=>"\xd0\x81","\xd1\x92"=>"\xd0\x82","\xd1\x93"=>"\xd0\x83",
607
		"\xd1\x94"=>"\xd0\x84","\xd1\x95"=>"\xd0\x85","\xd1\x96"=>"\xd0\x86","\xd1\x97"=>"\xd0\x87",
608
		"\xd1\x98"=>"\xd0\x88","\xd1\x99"=>"\xd0\x89","\xd1\x9a"=>"\xd0\x8a","\xd1\x9b"=>"\xd0\x8b",
609
		"\xd1\x9c"=>"\xd0\x8c","\xd1\x9d"=>"\xd0\x8d","\xd1\x9e"=>"\xd0\x8e","\xd1\x9f"=>"\xd0\x8f",
610
		"\xd1\xa1"=>"\xd1\xa0","\xd1\xa3"=>"\xd1\xa2","\xd1\xa5"=>"\xd1\xa4","\xd1\xa7"=>"\xd1\xa6",
611
		"\xd1\xa9"=>"\xd1\xa8","\xd1\xab"=>"\xd1\xaa","\xd1\xad"=>"\xd1\xac","\xd1\xaf"=>"\xd1\xae",
612
		"\xd1\xb1"=>"\xd1\xb0","\xd1\xb3"=>"\xd1\xb2","\xd1\xb5"=>"\xd1\xb4","\xd1\xb7"=>"\xd1\xb6",
613
		"\xd1\xb9"=>"\xd1\xb8","\xd1\xbb"=>"\xd1\xba","\xd1\xbd"=>"\xd1\xbc","\xd1\xbf"=>"\xd1\xbe",
614
		"\xd2\x81"=>"\xd2\x80","\xd2\x8d"=>"\xd2\x8c","\xd2\x8f"=>"\xd2\x8e","\xd2\x91"=>"\xd2\x90",
615
		"\xd2\x93"=>"\xd2\x92","\xd2\x95"=>"\xd2\x94","\xd2\x97"=>"\xd2\x96","\xd2\x99"=>"\xd2\x98",
616
		"\xd2\x9b"=>"\xd2\x9a","\xd2\x9d"=>"\xd2\x9c","\xd2\x9f"=>"\xd2\x9e","\xd2\xa1"=>"\xd2\xa0",
617
		"\xd2\xa3"=>"\xd2\xa2","\xd2\xa5"=>"\xd2\xa4","\xd2\xa7"=>"\xd2\xa6","\xd2\xa9"=>"\xd2\xa8",
618
		"\xd2\xab"=>"\xd2\xaa","\xd2\xad"=>"\xd2\xac","\xd2\xaf"=>"\xd2\xae","\xd2\xb1"=>"\xd2\xb0",
619
		"\xd2\xb3"=>"\xd2\xb2","\xd2\xb5"=>"\xd2\xb4","\xd2\xb7"=>"\xd2\xb6","\xd2\xb9"=>"\xd2\xb8",
620
		"\xd2\xbb"=>"\xd2\xba","\xd2\xbd"=>"\xd2\xbc","\xd2\xbf"=>"\xd2\xbe","\xd3\x82"=>"\xd3\x81",
621
		"\xd3\x84"=>"\xd3\x83","\xd3\x88"=>"\xd3\x87","\xd3\x8c"=>"\xd3\x8b","\xd3\x91"=>"\xd3\x90",
622
		"\xd3\x93"=>"\xd3\x92","\xd3\x95"=>"\xd3\x94","\xd3\x97"=>"\xd3\x96","\xd3\x99"=>"\xd3\x98",
623
		"\xd3\x9b"=>"\xd3\x9a","\xd3\x9d"=>"\xd3\x9c","\xd3\x9f"=>"\xd3\x9e","\xd3\xa1"=>"\xd3\xa0",
624
		"\xd3\xa3"=>"\xd3\xa2","\xd3\xa5"=>"\xd3\xa4","\xd3\xa7"=>"\xd3\xa6","\xd3\xa9"=>"\xd3\xa8",
625
		"\xd3\xab"=>"\xd3\xaa","\xd3\xad"=>"\xd3\xac","\xd3\xaf"=>"\xd3\xae","\xd3\xb1"=>"\xd3\xb0",
626
		"\xd3\xb3"=>"\xd3\xb2","\xd3\xb5"=>"\xd3\xb4","\xd3\xb9"=>"\xd3\xb8","\xd5\xa1"=>"\xd4\xb1",
627
		"\xd5\xa2"=>"\xd4\xb2","\xd5\xa3"=>"\xd4\xb3","\xd5\xa4"=>"\xd4\xb4","\xd5\xa5"=>"\xd4\xb5",
628
		"\xd5\xa6"=>"\xd4\xb6","\xd5\xa7"=>"\xd4\xb7","\xd5\xa8"=>"\xd4\xb8","\xd5\xa9"=>"\xd4\xb9",
629
		"\xd5\xaa"=>"\xd4\xba","\xd5\xab"=>"\xd4\xbb","\xd5\xac"=>"\xd4\xbc","\xd5\xad"=>"\xd4\xbd",
630
		"\xd5\xae"=>"\xd4\xbe","\xd5\xaf"=>"\xd4\xbf","\xd5\xb0"=>"\xd5\x80","\xd5\xb1"=>"\xd5\x81",
631
		"\xd5\xb2"=>"\xd5\x82","\xd5\xb3"=>"\xd5\x83","\xd5\xb4"=>"\xd5\x84","\xd5\xb5"=>"\xd5\x85",
632
		"\xd5\xb6"=>"\xd5\x86","\xd5\xb7"=>"\xd5\x87","\xd5\xb8"=>"\xd5\x88","\xd5\xb9"=>"\xd5\x89",
633
		"\xd5\xba"=>"\xd5\x8a","\xd5\xbb"=>"\xd5\x8b","\xd5\xbc"=>"\xd5\x8c","\xd5\xbd"=>"\xd5\x8d",
634
		"\xd5\xbe"=>"\xd5\x8e","\xd5\xbf"=>"\xd5\x8f","\xd6\x80"=>"\xd5\x90","\xd6\x81"=>"\xd5\x91",
635
		"\xd6\x82"=>"\xd5\x92","\xd6\x83"=>"\xd5\x93","\xd6\x84"=>"\xd5\x94","\xd6\x85"=>"\xd5\x95",
636
		"\xd6\x86"=>"\xd5\x96","\xe1\xb8\x81"=>"\xe1\xb8\x80","\xe1\xb8\x83"=>"\xe1\xb8\x82","\xe1\xb8\x85"=>"\xe1\xb8\x84",
637
		"\xe1\xb8\x87"=>"\xe1\xb8\x86","\xe1\xb8\x89"=>"\xe1\xb8\x88","\xe1\xb8\x8b"=>"\xe1\xb8\x8a","\xe1\xb8\x8d"=>"\xe1\xb8\x8c",
638
		"\xe1\xb8\x8f"=>"\xe1\xb8\x8e","\xe1\xb8\x91"=>"\xe1\xb8\x90","\xe1\xb8\x93"=>"\xe1\xb8\x92","\xe1\xb8\x95"=>"\xe1\xb8\x94",
639
		"\xe1\xb8\x97"=>"\xe1\xb8\x96","\xe1\xb8\x99"=>"\xe1\xb8\x98","\xe1\xb8\x9b"=>"\xe1\xb8\x9a","\xe1\xb8\x9d"=>"\xe1\xb8\x9c",
640
		"\xe1\xb8\x9f"=>"\xe1\xb8\x9e","\xe1\xb8\xa1"=>"\xe1\xb8\xa0","\xe1\xb8\xa3"=>"\xe1\xb8\xa2","\xe1\xb8\xa5"=>"\xe1\xb8\xa4",
641
		"\xe1\xb8\xa7"=>"\xe1\xb8\xa6","\xe1\xb8\xa9"=>"\xe1\xb8\xa8","\xe1\xb8\xab"=>"\xe1\xb8\xaa","\xe1\xb8\xad"=>"\xe1\xb8\xac",
642
		"\xe1\xb8\xaf"=>"\xe1\xb8\xae","\xe1\xb8\xb1"=>"\xe1\xb8\xb0","\xe1\xb8\xb3"=>"\xe1\xb8\xb2","\xe1\xb8\xb5"=>"\xe1\xb8\xb4",
643
		"\xe1\xb8\xb7"=>"\xe1\xb8\xb6","\xe1\xb8\xb9"=>"\xe1\xb8\xb8","\xe1\xb8\xbb"=>"\xe1\xb8\xba","\xe1\xb8\xbd"=>"\xe1\xb8\xbc",
644
		"\xe1\xb8\xbf"=>"\xe1\xb8\xbe","\xe1\xb9\x81"=>"\xe1\xb9\x80","\xe1\xb9\x83"=>"\xe1\xb9\x82","\xe1\xb9\x85"=>"\xe1\xb9\x84",
645
		"\xe1\xb9\x87"=>"\xe1\xb9\x86","\xe1\xb9\x89"=>"\xe1\xb9\x88","\xe1\xb9\x8b"=>"\xe1\xb9\x8a","\xe1\xb9\x8d"=>"\xe1\xb9\x8c",
646
		"\xe1\xb9\x8f"=>"\xe1\xb9\x8e","\xe1\xb9\x91"=>"\xe1\xb9\x90","\xe1\xb9\x93"=>"\xe1\xb9\x92","\xe1\xb9\x95"=>"\xe1\xb9\x94",
647
		"\xe1\xb9\x97"=>"\xe1\xb9\x96","\xe1\xb9\x99"=>"\xe1\xb9\x98","\xe1\xb9\x9b"=>"\xe1\xb9\x9a","\xe1\xb9\x9d"=>"\xe1\xb9\x9c",
648
		"\xe1\xb9\x9f"=>"\xe1\xb9\x9e","\xe1\xb9\xa1"=>"\xe1\xb9\xa0","\xe1\xb9\xa3"=>"\xe1\xb9\xa2","\xe1\xb9\xa5"=>"\xe1\xb9\xa4",
649
		"\xe1\xb9\xa7"=>"\xe1\xb9\xa6","\xe1\xb9\xa9"=>"\xe1\xb9\xa8","\xe1\xb9\xab"=>"\xe1\xb9\xaa","\xe1\xb9\xad"=>"\xe1\xb9\xac",
650
		"\xe1\xb9\xaf"=>"\xe1\xb9\xae","\xe1\xb9\xb1"=>"\xe1\xb9\xb0","\xe1\xb9\xb3"=>"\xe1\xb9\xb2","\xe1\xb9\xb5"=>"\xe1\xb9\xb4",
651
		"\xe1\xb9\xb7"=>"\xe1\xb9\xb6","\xe1\xb9\xb9"=>"\xe1\xb9\xb8","\xe1\xb9\xbb"=>"\xe1\xb9\xba","\xe1\xb9\xbd"=>"\xe1\xb9\xbc",
652
		"\xe1\xb9\xbf"=>"\xe1\xb9\xbe","\xe1\xba\x81"=>"\xe1\xba\x80","\xe1\xba\x83"=>"\xe1\xba\x82","\xe1\xba\x85"=>"\xe1\xba\x84",
653
		"\xe1\xba\x87"=>"\xe1\xba\x86","\xe1\xba\x89"=>"\xe1\xba\x88","\xe1\xba\x8b"=>"\xe1\xba\x8a","\xe1\xba\x8d"=>"\xe1\xba\x8c",
654
		"\xe1\xba\x8f"=>"\xe1\xba\x8e","\xe1\xba\x91"=>"\xe1\xba\x90","\xe1\xba\x93"=>"\xe1\xba\x92","\xe1\xba\x95"=>"\xe1\xba\x94",
655
		"\xe1\xba\x9b"=>"\xe1\xb9\xa0","\xe1\xba\xa1"=>"\xe1\xba\xa0","\xe1\xba\xa3"=>"\xe1\xba\xa2","\xe1\xba\xa5"=>"\xe1\xba\xa4",
656
		"\xe1\xba\xa7"=>"\xe1\xba\xa6","\xe1\xba\xa9"=>"\xe1\xba\xa8","\xe1\xba\xab"=>"\xe1\xba\xaa","\xe1\xba\xad"=>"\xe1\xba\xac",
657
		"\xe1\xba\xaf"=>"\xe1\xba\xae","\xe1\xba\xb1"=>"\xe1\xba\xb0","\xe1\xba\xb3"=>"\xe1\xba\xb2","\xe1\xba\xb5"=>"\xe1\xba\xb4",
658
		"\xe1\xba\xb7"=>"\xe1\xba\xb6","\xe1\xba\xb9"=>"\xe1\xba\xb8","\xe1\xba\xbb"=>"\xe1\xba\xba","\xe1\xba\xbd"=>"\xe1\xba\xbc",
659
		"\xe1\xba\xbf"=>"\xe1\xba\xbe","\xe1\xbb\x81"=>"\xe1\xbb\x80","\xe1\xbb\x83"=>"\xe1\xbb\x82","\xe1\xbb\x85"=>"\xe1\xbb\x84",
660
		"\xe1\xbb\x87"=>"\xe1\xbb\x86","\xe1\xbb\x89"=>"\xe1\xbb\x88","\xe1\xbb\x8b"=>"\xe1\xbb\x8a","\xe1\xbb\x8d"=>"\xe1\xbb\x8c",
661
		"\xe1\xbb\x8f"=>"\xe1\xbb\x8e","\xe1\xbb\x91"=>"\xe1\xbb\x90","\xe1\xbb\x93"=>"\xe1\xbb\x92","\xe1\xbb\x95"=>"\xe1\xbb\x94",
662
		"\xe1\xbb\x97"=>"\xe1\xbb\x96","\xe1\xbb\x99"=>"\xe1\xbb\x98","\xe1\xbb\x9b"=>"\xe1\xbb\x9a","\xe1\xbb\x9d"=>"\xe1\xbb\x9c",
663
		"\xe1\xbb\x9f"=>"\xe1\xbb\x9e","\xe1\xbb\xa1"=>"\xe1\xbb\xa0","\xe1\xbb\xa3"=>"\xe1\xbb\xa2","\xe1\xbb\xa5"=>"\xe1\xbb\xa4",
664
		"\xe1\xbb\xa7"=>"\xe1\xbb\xa6","\xe1\xbb\xa9"=>"\xe1\xbb\xa8","\xe1\xbb\xab"=>"\xe1\xbb\xaa","\xe1\xbb\xad"=>"\xe1\xbb\xac",
665
		"\xe1\xbb\xaf"=>"\xe1\xbb\xae","\xe1\xbb\xb1"=>"\xe1\xbb\xb0","\xe1\xbb\xb3"=>"\xe1\xbb\xb2","\xe1\xbb\xb5"=>"\xe1\xbb\xb4",
666
		"\xe1\xbb\xb7"=>"\xe1\xbb\xb6","\xe1\xbb\xb9"=>"\xe1\xbb\xb8","\xe1\xbc\x80"=>"\xe1\xbc\x88","\xe1\xbc\x81"=>"\xe1\xbc\x89",
667
		"\xe1\xbc\x82"=>"\xe1\xbc\x8a","\xe1\xbc\x83"=>"\xe1\xbc\x8b","\xe1\xbc\x84"=>"\xe1\xbc\x8c","\xe1\xbc\x85"=>"\xe1\xbc\x8d",
668
		"\xe1\xbc\x86"=>"\xe1\xbc\x8e","\xe1\xbc\x87"=>"\xe1\xbc\x8f","\xe1\xbc\x90"=>"\xe1\xbc\x98","\xe1\xbc\x91"=>"\xe1\xbc\x99",
669
		"\xe1\xbc\x92"=>"\xe1\xbc\x9a","\xe1\xbc\x93"=>"\xe1\xbc\x9b","\xe1\xbc\x94"=>"\xe1\xbc\x9c","\xe1\xbc\x95"=>"\xe1\xbc\x9d",
670
		"\xe1\xbc\xa0"=>"\xe1\xbc\xa8","\xe1\xbc\xa1"=>"\xe1\xbc\xa9","\xe1\xbc\xa2"=>"\xe1\xbc\xaa","\xe1\xbc\xa3"=>"\xe1\xbc\xab",
671
		"\xe1\xbc\xa4"=>"\xe1\xbc\xac","\xe1\xbc\xa5"=>"\xe1\xbc\xad","\xe1\xbc\xa6"=>"\xe1\xbc\xae","\xe1\xbc\xa7"=>"\xe1\xbc\xaf",
672
		"\xe1\xbc\xb0"=>"\xe1\xbc\xb8","\xe1\xbc\xb1"=>"\xe1\xbc\xb9","\xe1\xbc\xb2"=>"\xe1\xbc\xba","\xe1\xbc\xb3"=>"\xe1\xbc\xbb",
673
		"\xe1\xbc\xb4"=>"\xe1\xbc\xbc","\xe1\xbc\xb5"=>"\xe1\xbc\xbd","\xe1\xbc\xb6"=>"\xe1\xbc\xbe","\xe1\xbc\xb7"=>"\xe1\xbc\xbf",
674
		"\xe1\xbd\x80"=>"\xe1\xbd\x88","\xe1\xbd\x81"=>"\xe1\xbd\x89","\xe1\xbd\x82"=>"\xe1\xbd\x8a","\xe1\xbd\x83"=>"\xe1\xbd\x8b",
675
		"\xe1\xbd\x84"=>"\xe1\xbd\x8c","\xe1\xbd\x85"=>"\xe1\xbd\x8d","\xe1\xbd\x91"=>"\xe1\xbd\x99","\xe1\xbd\x93"=>"\xe1\xbd\x9b",
676
		"\xe1\xbd\x95"=>"\xe1\xbd\x9d","\xe1\xbd\x97"=>"\xe1\xbd\x9f","\xe1\xbd\xa0"=>"\xe1\xbd\xa8","\xe1\xbd\xa1"=>"\xe1\xbd\xa9",
677
		"\xe1\xbd\xa2"=>"\xe1\xbd\xaa","\xe1\xbd\xa3"=>"\xe1\xbd\xab","\xe1\xbd\xa4"=>"\xe1\xbd\xac","\xe1\xbd\xa5"=>"\xe1\xbd\xad",
678
		"\xe1\xbd\xa6"=>"\xe1\xbd\xae","\xe1\xbd\xa7"=>"\xe1\xbd\xaf","\xe1\xbd\xb0"=>"\xe1\xbe\xba","\xe1\xbd\xb1"=>"\xe1\xbe\xbb",
679
		"\xe1\xbd\xb2"=>"\xe1\xbf\x88","\xe1\xbd\xb3"=>"\xe1\xbf\x89","\xe1\xbd\xb4"=>"\xe1\xbf\x8a","\xe1\xbd\xb5"=>"\xe1\xbf\x8b",
680
		"\xe1\xbd\xb6"=>"\xe1\xbf\x9a","\xe1\xbd\xb7"=>"\xe1\xbf\x9b","\xe1\xbd\xb8"=>"\xe1\xbf\xb8","\xe1\xbd\xb9"=>"\xe1\xbf\xb9",
681
		"\xe1\xbd\xba"=>"\xe1\xbf\xaa","\xe1\xbd\xbb"=>"\xe1\xbf\xab","\xe1\xbd\xbc"=>"\xe1\xbf\xba","\xe1\xbd\xbd"=>"\xe1\xbf\xbb",
682
		"\xe1\xbe\x80"=>"\xe1\xbe\x88","\xe1\xbe\x81"=>"\xe1\xbe\x89","\xe1\xbe\x82"=>"\xe1\xbe\x8a","\xe1\xbe\x83"=>"\xe1\xbe\x8b",
683
		"\xe1\xbe\x84"=>"\xe1\xbe\x8c","\xe1\xbe\x85"=>"\xe1\xbe\x8d","\xe1\xbe\x86"=>"\xe1\xbe\x8e","\xe1\xbe\x87"=>"\xe1\xbe\x8f",
684
		"\xe1\xbe\x90"=>"\xe1\xbe\x98","\xe1\xbe\x91"=>"\xe1\xbe\x99","\xe1\xbe\x92"=>"\xe1\xbe\x9a","\xe1\xbe\x93"=>"\xe1\xbe\x9b",
685
		"\xe1\xbe\x94"=>"\xe1\xbe\x9c","\xe1\xbe\x95"=>"\xe1\xbe\x9d","\xe1\xbe\x96"=>"\xe1\xbe\x9e","\xe1\xbe\x97"=>"\xe1\xbe\x9f",
686
		"\xe1\xbe\xa0"=>"\xe1\xbe\xa8","\xe1\xbe\xa1"=>"\xe1\xbe\xa9","\xe1\xbe\xa2"=>"\xe1\xbe\xaa","\xe1\xbe\xa3"=>"\xe1\xbe\xab",
687
		"\xe1\xbe\xa4"=>"\xe1\xbe\xac","\xe1\xbe\xa5"=>"\xe1\xbe\xad","\xe1\xbe\xa6"=>"\xe1\xbe\xae","\xe1\xbe\xa7"=>"\xe1\xbe\xaf",
688
		"\xe1\xbe\xb0"=>"\xe1\xbe\xb8","\xe1\xbe\xb1"=>"\xe1\xbe\xb9","\xe1\xbe\xb3"=>"\xe1\xbe\xbc","\xe1\xbe\xbe"=>"\xce\x99",
689
		"\xe1\xbf\x83"=>"\xe1\xbf\x8c","\xe1\xbf\x90"=>"\xe1\xbf\x98","\xe1\xbf\x91"=>"\xe1\xbf\x99","\xe1\xbf\xa0"=>"\xe1\xbf\xa8",
690
		"\xe1\xbf\xa1"=>"\xe1\xbf\xa9","\xe1\xbf\xa5"=>"\xe1\xbf\xac","\xe1\xbf\xb3"=>"\xe1\xbf\xbc","\xe2\x85\xb0"=>"\xe2\x85\xa0",
691
		"\xe2\x85\xb1"=>"\xe2\x85\xa1","\xe2\x85\xb2"=>"\xe2\x85\xa2","\xe2\x85\xb3"=>"\xe2\x85\xa3","\xe2\x85\xb4"=>"\xe2\x85\xa4",
692
		"\xe2\x85\xb5"=>"\xe2\x85\xa5","\xe2\x85\xb6"=>"\xe2\x85\xa6","\xe2\x85\xb7"=>"\xe2\x85\xa7","\xe2\x85\xb8"=>"\xe2\x85\xa8",
693
		"\xe2\x85\xb9"=>"\xe2\x85\xa9","\xe2\x85\xba"=>"\xe2\x85\xaa","\xe2\x85\xbb"=>"\xe2\x85\xab","\xe2\x85\xbc"=>"\xe2\x85\xac",
694
		"\xe2\x85\xbd"=>"\xe2\x85\xad","\xe2\x85\xbe"=>"\xe2\x85\xae","\xe2\x85\xbf"=>"\xe2\x85\xaf","\xe2\x93\x90"=>"\xe2\x92\xb6",
695
		"\xe2\x93\x91"=>"\xe2\x92\xb7","\xe2\x93\x92"=>"\xe2\x92\xb8","\xe2\x93\x93"=>"\xe2\x92\xb9","\xe2\x93\x94"=>"\xe2\x92\xba",
696
		"\xe2\x93\x95"=>"\xe2\x92\xbb","\xe2\x93\x96"=>"\xe2\x92\xbc","\xe2\x93\x97"=>"\xe2\x92\xbd","\xe2\x93\x98"=>"\xe2\x92\xbe",
697
		"\xe2\x93\x99"=>"\xe2\x92\xbf","\xe2\x93\x9a"=>"\xe2\x93\x80","\xe2\x93\x9b"=>"\xe2\x93\x81","\xe2\x93\x9c"=>"\xe2\x93\x82",
698
		"\xe2\x93\x9d"=>"\xe2\x93\x83","\xe2\x93\x9e"=>"\xe2\x93\x84","\xe2\x93\x9f"=>"\xe2\x93\x85","\xe2\x93\xa0"=>"\xe2\x93\x86",
699
		"\xe2\x93\xa1"=>"\xe2\x93\x87","\xe2\x93\xa2"=>"\xe2\x93\x88","\xe2\x93\xa3"=>"\xe2\x93\x89","\xe2\x93\xa4"=>"\xe2\x93\x8a",
700
		"\xe2\x93\xa5"=>"\xe2\x93\x8b","\xe2\x93\xa6"=>"\xe2\x93\x8c","\xe2\x93\xa7"=>"\xe2\x93\x8d","\xe2\x93\xa8"=>"\xe2\x93\x8e",
701
		"\xe2\x93\xa9"=>"\xe2\x93\x8f","\xef\xbd\x81"=>"\xef\xbc\xa1","\xef\xbd\x82"=>"\xef\xbc\xa2","\xef\xbd\x83"=>"\xef\xbc\xa3",
702
		"\xef\xbd\x84"=>"\xef\xbc\xa4","\xef\xbd\x85"=>"\xef\xbc\xa5","\xef\xbd\x86"=>"\xef\xbc\xa6","\xef\xbd\x87"=>"\xef\xbc\xa7",
703
		"\xef\xbd\x88"=>"\xef\xbc\xa8","\xef\xbd\x89"=>"\xef\xbc\xa9","\xef\xbd\x8a"=>"\xef\xbc\xaa","\xef\xbd\x8b"=>"\xef\xbc\xab",
704
		"\xef\xbd\x8c"=>"\xef\xbc\xac","\xef\xbd\x8d"=>"\xef\xbc\xad","\xef\xbd\x8e"=>"\xef\xbc\xae","\xef\xbd\x8f"=>"\xef\xbc\xaf",
705
		"\xef\xbd\x90"=>"\xef\xbc\xb0","\xef\xbd\x91"=>"\xef\xbc\xb1","\xef\xbd\x92"=>"\xef\xbc\xb2","\xef\xbd\x93"=>"\xef\xbc\xb3",
706
		"\xef\xbd\x94"=>"\xef\xbc\xb4","\xef\xbd\x95"=>"\xef\xbc\xb5","\xef\xbd\x96"=>"\xef\xbc\xb6","\xef\xbd\x97"=>"\xef\xbc\xb7",
707
		"\xef\xbd\x98"=>"\xef\xbc\xb8","\xef\xbd\x99"=>"\xef\xbc\xb9","\xef\xbd\x9a"=>"\xef\xbc\xba","\xf0\x90\x90\xa8"=>"\xf0\x90\x90\x80",
708
		"\xf0\x90\x90\xa9"=>"\xf0\x90\x90\x81","\xf0\x90\x90\xaa"=>"\xf0\x90\x90\x82","\xf0\x90\x90\xab"=>"\xf0\x90\x90\x83","\xf0\x90\x90\xac"=>"\xf0\x90\x90\x84",
709
		"\xf0\x90\x90\xad"=>"\xf0\x90\x90\x85","\xf0\x90\x90\xae"=>"\xf0\x90\x90\x86","\xf0\x90\x90\xaf"=>"\xf0\x90\x90\x87","\xf0\x90\x90\xb0"=>"\xf0\x90\x90\x88",
710
		"\xf0\x90\x90\xb1"=>"\xf0\x90\x90\x89","\xf0\x90\x90\xb2"=>"\xf0\x90\x90\x8a","\xf0\x90\x90\xb3"=>"\xf0\x90\x90\x8b","\xf0\x90\x90\xb4"=>"\xf0\x90\x90\x8c",
711
		"\xf0\x90\x90\xb5"=>"\xf0\x90\x90\x8d","\xf0\x90\x90\xb6"=>"\xf0\x90\x90\x8e","\xf0\x90\x90\xb7"=>"\xf0\x90\x90\x8f","\xf0\x90\x90\xb8"=>"\xf0\x90\x90\x90",
712
		"\xf0\x90\x90\xb9"=>"\xf0\x90\x90\x91","\xf0\x90\x90\xba"=>"\xf0\x90\x90\x92","\xf0\x90\x90\xbb"=>"\xf0\x90\x90\x93","\xf0\x90\x90\xbc"=>"\xf0\x90\x90\x94",
713
		"\xf0\x90\x90\xbd"=>"\xf0\x90\x90\x95","\xf0\x90\x90\xbe"=>"\xf0\x90\x90\x96","\xf0\x90\x90\xbf"=>"\xf0\x90\x90\x97","\xf0\x90\x91\x80"=>"\xf0\x90\x90\x98",
714
		"\xf0\x90\x91\x81"=>"\xf0\x90\x90\x99","\xf0\x90\x91\x82"=>"\xf0\x90\x90\x9a","\xf0\x90\x91\x83"=>"\xf0\x90\x90\x9b","\xf0\x90\x91\x84"=>"\xf0\x90\x90\x9c",
715
		"\xf0\x90\x91\x85"=>"\xf0\x90\x90\x9d","\xf0\x90\x91\x86"=>"\xf0\x90\x90\x9e","\xf0\x90\x91\x87"=>"\xf0\x90\x90\x9f","\xf0\x90\x91\x88"=>"\xf0\x90\x90\xa0",
716
		"\xf0\x90\x91\x89"=>"\xf0\x90\x90\xa1","\xf0\x90\x91\x8a"=>"\xf0\x90\x90\xa2","\xf0\x90\x91\x8b"=>"\xf0\x90\x90\xa3","\xf0\x90\x91\x8c"=>"\xf0\x90\x90\xa4",
717
		"\xf0\x90\x91\x8d"=>"\xf0\x90\x90\xa5","\xc3\x9f"=>"\x53\x53","\xef\xac\x80"=>"\x46\x46","\xef\xac\x81"=>"\x46\x49",
718
		"\xef\xac\x82"=>"\x46\x4c","\xef\xac\x83"=>"\x46\x46\x49","\xef\xac\x84"=>"\x46\x46\x4c","\xef\xac\x85"=>"\x53\x54",
719
		"\xef\xac\x86"=>"\x53\x54"
720
	);
721
  /**
722
   * UTF-8 Case lookup table
723
   *
724
   * This lookuptable defines the lower case letters to their correspponding
725
   * upper case letter in UTF-8
726
   *
727
   * @author Andreas Gohr <andi@splitbrain.org>
728
   * @author thorn <thorn@nettest.thekk.de>
729
   */
730
	global $UTF8_UPPER_TO_LOWER;
731
	$UTF8_UPPER_TO_LOWER = array(
732
		"\x41"=>"\x61","\x42"=>"\x62","\x43"=>"\x63","\x44"=>"\x64",
733
		"\x45"=>"\x65","\x46"=>"\x66","\x47"=>"\x67","\x48"=>"\x68",
734
		"\x49"=>"\x69","\x4a"=>"\x6a","\x4b"=>"\x6b","\x4c"=>"\x6c",
735
		"\x4d"=>"\x6d","\x4e"=>"\x6e","\x4f"=>"\x6f","\x50"=>"\x70",
736
		"\x51"=>"\x71","\x52"=>"\x72","\x53"=>"\x73","\x54"=>"\x74",
737
		"\x55"=>"\x75","\x56"=>"\x76","\x57"=>"\x77","\x58"=>"\x78",
738
		"\x59"=>"\x79","\x5a"=>"\x7a","\xc3\x80"=>"\xc3\xa0","\xc3\x81"=>"\xc3\xa1",
739
		"\xc3\x82"=>"\xc3\xa2","\xc3\x83"=>"\xc3\xa3","\xc3\x84"=>"\xc3\xa4","\xc3\x85"=>"\xc3\xa5",
740
		"\xc3\x86"=>"\xc3\xa6","\xc3\x87"=>"\xc3\xa7","\xc3\x88"=>"\xc3\xa8","\xc3\x89"=>"\xc3\xa9",
741
		"\xc3\x8a"=>"\xc3\xaa","\xc3\x8b"=>"\xc3\xab","\xc3\x8c"=>"\xc3\xac","\xc3\x8d"=>"\xc3\xad",
742
		"\xc3\x8e"=>"\xc3\xae","\xc3\x8f"=>"\xc3\xaf","\xc3\x90"=>"\xc3\xb0","\xc3\x91"=>"\xc3\xb1",
743
		"\xc3\x92"=>"\xc3\xb2","\xc3\x93"=>"\xc3\xb3","\xc3\x94"=>"\xc3\xb4","\xc3\x95"=>"\xc3\xb5",
744
		"\xc3\x96"=>"\xc3\xb6","\xc3\x98"=>"\xc3\xb8","\xc3\x99"=>"\xc3\xb9","\xc3\x9a"=>"\xc3\xba",
745
		"\xc3\x9b"=>"\xc3\xbb","\xc3\x9c"=>"\xc3\xbc","\xc3\x9d"=>"\xc3\xbd","\xc3\x9e"=>"\xc3\xbe",
746
		"\xc4\x80"=>"\xc4\x81","\xc4\x82"=>"\xc4\x83","\xc4\x84"=>"\xc4\x85","\xc4\x86"=>"\xc4\x87",
747
		"\xc4\x88"=>"\xc4\x89","\xc4\x8a"=>"\xc4\x8b","\xc4\x8c"=>"\xc4\x8d","\xc4\x8e"=>"\xc4\x8f",
748
		"\xc4\x90"=>"\xc4\x91","\xc4\x92"=>"\xc4\x93","\xc4\x94"=>"\xc4\x95","\xc4\x96"=>"\xc4\x97",
749
		"\xc4\x98"=>"\xc4\x99","\xc4\x9a"=>"\xc4\x9b","\xc4\x9c"=>"\xc4\x9d","\xc4\x9e"=>"\xc4\x9f",
750
		"\xc4\xa0"=>"\xc4\xa1","\xc4\xa2"=>"\xc4\xa3","\xc4\xa4"=>"\xc4\xa5","\xc4\xa6"=>"\xc4\xa7",
751
		"\xc4\xa8"=>"\xc4\xa9","\xc4\xaa"=>"\xc4\xab","\xc4\xac"=>"\xc4\xad","\xc4\xae"=>"\xc4\xaf",
752
		"\xc4\xb0"=>"\x69","\xc4\xb2"=>"\xc4\xb3","\xc4\xb4"=>"\xc4\xb5","\xc4\xb6"=>"\xc4\xb7",
753
		"\xc4\xb9"=>"\xc4\xba","\xc4\xbb"=>"\xc4\xbc","\xc4\xbd"=>"\xc4\xbe","\xc4\xbf"=>"\xc5\x80",
754
		"\xc5\x81"=>"\xc5\x82","\xc5\x83"=>"\xc5\x84","\xc5\x85"=>"\xc5\x86","\xc5\x87"=>"\xc5\x88",
755
		"\xc5\x8a"=>"\xc5\x8b","\xc5\x8c"=>"\xc5\x8d","\xc5\x8e"=>"\xc5\x8f","\xc5\x90"=>"\xc5\x91",
756
		"\xc5\x92"=>"\xc5\x93","\xc5\x94"=>"\xc5\x95","\xc5\x96"=>"\xc5\x97","\xc5\x98"=>"\xc5\x99",
757
		"\xc5\x9a"=>"\xc5\x9b","\xc5\x9c"=>"\xc5\x9d","\xc5\x9e"=>"\xc5\x9f","\xc5\xa0"=>"\xc5\xa1",
758
		"\xc5\xa2"=>"\xc5\xa3","\xc5\xa4"=>"\xc5\xa5","\xc5\xa6"=>"\xc5\xa7","\xc5\xa8"=>"\xc5\xa9",
759
		"\xc5\xaa"=>"\xc5\xab","\xc5\xac"=>"\xc5\xad","\xc5\xae"=>"\xc5\xaf","\xc5\xb0"=>"\xc5\xb1",
760
		"\xc5\xb2"=>"\xc5\xb3","\xc5\xb4"=>"\xc5\xb5","\xc5\xb6"=>"\xc5\xb7","\xc5\xb8"=>"\xc3\xbf",
761
		"\xc5\xb9"=>"\xc5\xba","\xc5\xbb"=>"\xc5\xbc","\xc5\xbd"=>"\xc5\xbe","\xc6\x81"=>"\xc9\x93",
762
		"\xc6\x82"=>"\xc6\x83","\xc6\x84"=>"\xc6\x85","\xc6\x86"=>"\xc9\x94","\xc6\x87"=>"\xc6\x88",
763
		"\xc6\x89"=>"\xc9\x96","\xc6\x8a"=>"\xc9\x97","\xc6\x8b"=>"\xc6\x8c","\xc6\x8e"=>"\xc7\x9d",
764
		"\xc6\x8f"=>"\xc9\x99","\xc6\x90"=>"\xc9\x9b","\xc6\x91"=>"\xc6\x92","\xc6\x93"=>"\xc9\xa0",
765
		"\xc6\x94"=>"\xc9\xa3","\xc6\x96"=>"\xc9\xa9","\xc6\x97"=>"\xc9\xa8","\xc6\x98"=>"\xc6\x99",
766
		"\xc6\x9c"=>"\xc9\xaf","\xc6\x9d"=>"\xc9\xb2","\xc6\x9f"=>"\xc9\xb5","\xc6\xa0"=>"\xc6\xa1",
767
		"\xc6\xa2"=>"\xc6\xa3","\xc6\xa4"=>"\xc6\xa5","\xc6\xa6"=>"\xca\x80","\xc6\xa7"=>"\xc6\xa8",
768
		"\xc6\xa9"=>"\xca\x83","\xc6\xac"=>"\xc6\xad","\xc6\xae"=>"\xca\x88","\xc6\xaf"=>"\xc6\xb0",
769
		"\xc6\xb1"=>"\xca\x8a","\xc6\xb2"=>"\xca\x8b","\xc6\xb3"=>"\xc6\xb4","\xc6\xb5"=>"\xc6\xb6",
770
		"\xc6\xb7"=>"\xca\x92","\xc6\xb8"=>"\xc6\xb9","\xc6\xbc"=>"\xc6\xbd","\xc7\x84"=>"\xc7\x86",
771
		"\xc7\x85"=>"\xc7\x86","\xc7\x87"=>"\xc7\x89","\xc7\x88"=>"\xc7\x89","\xc7\x8a"=>"\xc7\x8c",
772
		"\xc7\x8b"=>"\xc7\x8c","\xc7\x8d"=>"\xc7\x8e","\xc7\x8f"=>"\xc7\x90","\xc7\x91"=>"\xc7\x92",
773
		"\xc7\x93"=>"\xc7\x94","\xc7\x95"=>"\xc7\x96","\xc7\x97"=>"\xc7\x98","\xc7\x99"=>"\xc7\x9a",
774
		"\xc7\x9b"=>"\xc7\x9c","\xc7\x9e"=>"\xc7\x9f","\xc7\xa0"=>"\xc7\xa1","\xc7\xa2"=>"\xc7\xa3",
775
		"\xc7\xa4"=>"\xc7\xa5","\xc7\xa6"=>"\xc7\xa7","\xc7\xa8"=>"\xc7\xa9","\xc7\xaa"=>"\xc7\xab",
776
		"\xc7\xac"=>"\xc7\xad","\xc7\xae"=>"\xc7\xaf","\xc7\xb1"=>"\xc7\xb3","\xc7\xb2"=>"\xc7\xb3",
777
		"\xc7\xb4"=>"\xc7\xb5","\xc7\xb6"=>"\xc6\x95","\xc7\xb7"=>"\xc6\xbf","\xc7\xb8"=>"\xc7\xb9",
778
		"\xc7\xba"=>"\xc7\xbb","\xc7\xbc"=>"\xc7\xbd","\xc7\xbe"=>"\xc7\xbf","\xc8\x80"=>"\xc8\x81",
779
		"\xc8\x82"=>"\xc8\x83","\xc8\x84"=>"\xc8\x85","\xc8\x86"=>"\xc8\x87","\xc8\x88"=>"\xc8\x89",
780
		"\xc8\x8a"=>"\xc8\x8b","\xc8\x8c"=>"\xc8\x8d","\xc8\x8e"=>"\xc8\x8f","\xc8\x90"=>"\xc8\x91",
781
		"\xc8\x92"=>"\xc8\x93","\xc8\x94"=>"\xc8\x95","\xc8\x96"=>"\xc8\x97","\xc8\x98"=>"\xc8\x99",
782
		"\xc8\x9a"=>"\xc8\x9b","\xc8\x9c"=>"\xc8\x9d","\xc8\x9e"=>"\xc8\x9f","\xc8\xa2"=>"\xc8\xa3",
783
		"\xc8\xa4"=>"\xc8\xa5","\xc8\xa6"=>"\xc8\xa7","\xc8\xa8"=>"\xc8\xa9","\xc8\xaa"=>"\xc8\xab",
784
		"\xc8\xac"=>"\xc8\xad","\xc8\xae"=>"\xc8\xaf","\xc8\xb0"=>"\xc8\xb1","\xc8\xb2"=>"\xc8\xb3",
785
		"\xce\x86"=>"\xce\xac","\xce\x88"=>"\xce\xad","\xce\x89"=>"\xce\xae","\xce\x8a"=>"\xce\xaf",
786
		"\xce\x8c"=>"\xcf\x8c","\xce\x8e"=>"\xcf\x8d","\xce\x8f"=>"\xcf\x8e","\xce\x91"=>"\xce\xb1",
787
		"\xce\x92"=>"\xce\xb2","\xce\x93"=>"\xce\xb3","\xce\x94"=>"\xce\xb4","\xce\x95"=>"\xce\xb5",
788
		"\xce\x96"=>"\xce\xb6","\xce\x97"=>"\xce\xb7","\xce\x98"=>"\xce\xb8","\xce\x99"=>"\xce\xb9",
789
		"\xce\x9a"=>"\xce\xba","\xce\x9b"=>"\xce\xbb","\xce\x9c"=>"\xce\xbc","\xce\x9d"=>"\xce\xbd",
790
		"\xce\x9e"=>"\xce\xbe","\xce\x9f"=>"\xce\xbf","\xce\xa0"=>"\xcf\x80","\xce\xa1"=>"\xcf\x81",
791
		"\xce\xa3"=>"\xcf\x83","\xce\xa4"=>"\xcf\x84","\xce\xa5"=>"\xcf\x85","\xce\xa6"=>"\xcf\x86",
792
		"\xce\xa7"=>"\xcf\x87","\xce\xa8"=>"\xcf\x88","\xce\xa9"=>"\xcf\x89","\xce\xaa"=>"\xcf\x8a",
793
		"\xce\xab"=>"\xcf\x8b","\xcf\x9a"=>"\xcf\x9b","\xcf\x9c"=>"\xcf\x9d","\xcf\x9e"=>"\xcf\x9f",
794
		"\xcf\xa0"=>"\xcf\xa1","\xcf\xa2"=>"\xcf\xa3","\xcf\xa4"=>"\xcf\xa5","\xcf\xa6"=>"\xcf\xa7",
795
		"\xcf\xa8"=>"\xcf\xa9","\xcf\xaa"=>"\xcf\xab","\xcf\xac"=>"\xcf\xad","\xcf\xae"=>"\xcf\xaf",
796
		"\xcf\xb4"=>"\xce\xb8","\xd0\x80"=>"\xd1\x90","\xd0\x81"=>"\xd1\x91","\xd0\x82"=>"\xd1\x92",
797
		"\xd0\x83"=>"\xd1\x93","\xd0\x84"=>"\xd1\x94","\xd0\x85"=>"\xd1\x95","\xd0\x86"=>"\xd1\x96",
798
		"\xd0\x87"=>"\xd1\x97","\xd0\x88"=>"\xd1\x98","\xd0\x89"=>"\xd1\x99","\xd0\x8a"=>"\xd1\x9a",
799
		"\xd0\x8b"=>"\xd1\x9b","\xd0\x8c"=>"\xd1\x9c","\xd0\x8d"=>"\xd1\x9d","\xd0\x8e"=>"\xd1\x9e",
800
		"\xd0\x8f"=>"\xd1\x9f","\xd0\x90"=>"\xd0\xb0","\xd0\x91"=>"\xd0\xb1","\xd0\x92"=>"\xd0\xb2",
801
		"\xd0\x93"=>"\xd0\xb3","\xd0\x94"=>"\xd0\xb4","\xd0\x95"=>"\xd0\xb5","\xd0\x96"=>"\xd0\xb6",
802
		"\xd0\x97"=>"\xd0\xb7","\xd0\x98"=>"\xd0\xb8","\xd0\x99"=>"\xd0\xb9","\xd0\x9a"=>"\xd0\xba",
803
		"\xd0\x9b"=>"\xd0\xbb","\xd0\x9c"=>"\xd0\xbc","\xd0\x9d"=>"\xd0\xbd","\xd0\x9e"=>"\xd0\xbe",
804
		"\xd0\x9f"=>"\xd0\xbf","\xd0\xa0"=>"\xd1\x80","\xd0\xa1"=>"\xd1\x81","\xd0\xa2"=>"\xd1\x82",
805
		"\xd0\xa3"=>"\xd1\x83","\xd0\xa4"=>"\xd1\x84","\xd0\xa5"=>"\xd1\x85","\xd0\xa6"=>"\xd1\x86",
806
		"\xd0\xa7"=>"\xd1\x87","\xd0\xa8"=>"\xd1\x88","\xd0\xa9"=>"\xd1\x89","\xd0\xaa"=>"\xd1\x8a",
807
		"\xd0\xab"=>"\xd1\x8b","\xd0\xac"=>"\xd1\x8c","\xd0\xad"=>"\xd1\x8d","\xd0\xae"=>"\xd1\x8e",
808
		"\xd0\xaf"=>"\xd1\x8f","\xd1\xa0"=>"\xd1\xa1","\xd1\xa2"=>"\xd1\xa3","\xd1\xa4"=>"\xd1\xa5",
809
		"\xd1\xa6"=>"\xd1\xa7","\xd1\xa8"=>"\xd1\xa9","\xd1\xaa"=>"\xd1\xab","\xd1\xac"=>"\xd1\xad",
810
		"\xd1\xae"=>"\xd1\xaf","\xd1\xb0"=>"\xd1\xb1","\xd1\xb2"=>"\xd1\xb3","\xd1\xb4"=>"\xd1\xb5",
811
		"\xd1\xb6"=>"\xd1\xb7","\xd1\xb8"=>"\xd1\xb9","\xd1\xba"=>"\xd1\xbb","\xd1\xbc"=>"\xd1\xbd",
812
		"\xd1\xbe"=>"\xd1\xbf","\xd2\x80"=>"\xd2\x81","\xd2\x8c"=>"\xd2\x8d","\xd2\x8e"=>"\xd2\x8f",
813
		"\xd2\x90"=>"\xd2\x91","\xd2\x92"=>"\xd2\x93","\xd2\x94"=>"\xd2\x95","\xd2\x96"=>"\xd2\x97",
814
		"\xd2\x98"=>"\xd2\x99","\xd2\x9a"=>"\xd2\x9b","\xd2\x9c"=>"\xd2\x9d","\xd2\x9e"=>"\xd2\x9f",
815
		"\xd2\xa0"=>"\xd2\xa1","\xd2\xa2"=>"\xd2\xa3","\xd2\xa4"=>"\xd2\xa5","\xd2\xa6"=>"\xd2\xa7",
816
		"\xd2\xa8"=>"\xd2\xa9","\xd2\xaa"=>"\xd2\xab","\xd2\xac"=>"\xd2\xad","\xd2\xae"=>"\xd2\xaf",
817
		"\xd2\xb0"=>"\xd2\xb1","\xd2\xb2"=>"\xd2\xb3","\xd2\xb4"=>"\xd2\xb5","\xd2\xb6"=>"\xd2\xb7",
818
		"\xd2\xb8"=>"\xd2\xb9","\xd2\xba"=>"\xd2\xbb","\xd2\xbc"=>"\xd2\xbd","\xd2\xbe"=>"\xd2\xbf",
819
		"\xd3\x81"=>"\xd3\x82","\xd3\x83"=>"\xd3\x84","\xd3\x87"=>"\xd3\x88","\xd3\x8b"=>"\xd3\x8c",
820
		"\xd3\x90"=>"\xd3\x91","\xd3\x92"=>"\xd3\x93","\xd3\x94"=>"\xd3\x95","\xd3\x96"=>"\xd3\x97",
821
		"\xd3\x98"=>"\xd3\x99","\xd3\x9a"=>"\xd3\x9b","\xd3\x9c"=>"\xd3\x9d","\xd3\x9e"=>"\xd3\x9f",
822
		"\xd3\xa0"=>"\xd3\xa1","\xd3\xa2"=>"\xd3\xa3","\xd3\xa4"=>"\xd3\xa5","\xd3\xa6"=>"\xd3\xa7",
823
		"\xd3\xa8"=>"\xd3\xa9","\xd3\xaa"=>"\xd3\xab","\xd3\xac"=>"\xd3\xad","\xd3\xae"=>"\xd3\xaf",
824
		"\xd3\xb0"=>"\xd3\xb1","\xd3\xb2"=>"\xd3\xb3","\xd3\xb4"=>"\xd3\xb5","\xd3\xb8"=>"\xd3\xb9",
825
		"\xd4\xb1"=>"\xd5\xa1","\xd4\xb2"=>"\xd5\xa2","\xd4\xb3"=>"\xd5\xa3","\xd4\xb4"=>"\xd5\xa4",
826
		"\xd4\xb5"=>"\xd5\xa5","\xd4\xb6"=>"\xd5\xa6","\xd4\xb7"=>"\xd5\xa7","\xd4\xb8"=>"\xd5\xa8",
827
		"\xd4\xb9"=>"\xd5\xa9","\xd4\xba"=>"\xd5\xaa","\xd4\xbb"=>"\xd5\xab","\xd4\xbc"=>"\xd5\xac",
828
		"\xd4\xbd"=>"\xd5\xad","\xd4\xbe"=>"\xd5\xae","\xd4\xbf"=>"\xd5\xaf","\xd5\x80"=>"\xd5\xb0",
829
		"\xd5\x81"=>"\xd5\xb1","\xd5\x82"=>"\xd5\xb2","\xd5\x83"=>"\xd5\xb3","\xd5\x84"=>"\xd5\xb4",
830
		"\xd5\x85"=>"\xd5\xb5","\xd5\x86"=>"\xd5\xb6","\xd5\x87"=>"\xd5\xb7","\xd5\x88"=>"\xd5\xb8",
831
		"\xd5\x89"=>"\xd5\xb9","\xd5\x8a"=>"\xd5\xba","\xd5\x8b"=>"\xd5\xbb","\xd5\x8c"=>"\xd5\xbc",
832
		"\xd5\x8d"=>"\xd5\xbd","\xd5\x8e"=>"\xd5\xbe","\xd5\x8f"=>"\xd5\xbf","\xd5\x90"=>"\xd6\x80",
833
		"\xd5\x91"=>"\xd6\x81","\xd5\x92"=>"\xd6\x82","\xd5\x93"=>"\xd6\x83","\xd5\x94"=>"\xd6\x84",
834
		"\xd5\x95"=>"\xd6\x85","\xd5\x96"=>"\xd6\x86","\xe1\xb8\x80"=>"\xe1\xb8\x81","\xe1\xb8\x82"=>"\xe1\xb8\x83",
835
		"\xe1\xb8\x84"=>"\xe1\xb8\x85","\xe1\xb8\x86"=>"\xe1\xb8\x87","\xe1\xb8\x88"=>"\xe1\xb8\x89","\xe1\xb8\x8a"=>"\xe1\xb8\x8b",
836
		"\xe1\xb8\x8c"=>"\xe1\xb8\x8d","\xe1\xb8\x8e"=>"\xe1\xb8\x8f","\xe1\xb8\x90"=>"\xe1\xb8\x91","\xe1\xb8\x92"=>"\xe1\xb8\x93",
837
		"\xe1\xb8\x94"=>"\xe1\xb8\x95","\xe1\xb8\x96"=>"\xe1\xb8\x97","\xe1\xb8\x98"=>"\xe1\xb8\x99","\xe1\xb8\x9a"=>"\xe1\xb8\x9b",
838
		"\xe1\xb8\x9c"=>"\xe1\xb8\x9d","\xe1\xb8\x9e"=>"\xe1\xb8\x9f","\xe1\xb8\xa0"=>"\xe1\xb8\xa1","\xe1\xb8\xa2"=>"\xe1\xb8\xa3",
839
		"\xe1\xb8\xa4"=>"\xe1\xb8\xa5","\xe1\xb8\xa6"=>"\xe1\xb8\xa7","\xe1\xb8\xa8"=>"\xe1\xb8\xa9","\xe1\xb8\xaa"=>"\xe1\xb8\xab",
840
		"\xe1\xb8\xac"=>"\xe1\xb8\xad","\xe1\xb8\xae"=>"\xe1\xb8\xaf","\xe1\xb8\xb0"=>"\xe1\xb8\xb1","\xe1\xb8\xb2"=>"\xe1\xb8\xb3",
841
		"\xe1\xb8\xb4"=>"\xe1\xb8\xb5","\xe1\xb8\xb6"=>"\xe1\xb8\xb7","\xe1\xb8\xb8"=>"\xe1\xb8\xb9","\xe1\xb8\xba"=>"\xe1\xb8\xbb",
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff