549 | | // Decompositions for Latin-1 Supplement |
550 | | chr(195).chr(128) => 'A', chr(195).chr(129) => 'A', |
551 | | chr(195).chr(130) => 'A', chr(195).chr(131) => 'A', |
552 | | chr(195).chr(132) => 'A', chr(195).chr(133) => 'A', |
553 | | chr(195).chr(134) => 'AE',chr(195).chr(135) => 'C', |
554 | | chr(195).chr(136) => 'E', chr(195).chr(137) => 'E', |
555 | | chr(195).chr(138) => 'E', chr(195).chr(139) => 'E', |
556 | | chr(195).chr(140) => 'I', chr(195).chr(141) => 'I', |
557 | | chr(195).chr(142) => 'I', chr(195).chr(143) => 'I', |
558 | | chr(195).chr(144) => 'D', chr(195).chr(145) => 'N', |
559 | | chr(195).chr(146) => 'O', chr(195).chr(147) => 'O', |
560 | | chr(195).chr(148) => 'O', chr(195).chr(149) => 'O', |
561 | | chr(195).chr(150) => 'O', chr(195).chr(153) => 'U', |
562 | | chr(195).chr(154) => 'U', chr(195).chr(155) => 'U', |
563 | | chr(195).chr(156) => 'U', chr(195).chr(157) => 'Y', |
564 | | chr(195).chr(158) => 'TH',chr(195).chr(159) => 's', |
565 | | chr(195).chr(160) => 'a', chr(195).chr(161) => 'a', |
566 | | chr(195).chr(162) => 'a', chr(195).chr(163) => 'a', |
567 | | chr(195).chr(164) => 'a', chr(195).chr(165) => 'a', |
568 | | chr(195).chr(166) => 'ae',chr(195).chr(167) => 'c', |
569 | | chr(195).chr(168) => 'e', chr(195).chr(169) => 'e', |
570 | | chr(195).chr(170) => 'e', chr(195).chr(171) => 'e', |
571 | | chr(195).chr(172) => 'i', chr(195).chr(173) => 'i', |
572 | | chr(195).chr(174) => 'i', chr(195).chr(175) => 'i', |
573 | | chr(195).chr(176) => 'd', chr(195).chr(177) => 'n', |
574 | | chr(195).chr(178) => 'o', chr(195).chr(179) => 'o', |
575 | | chr(195).chr(180) => 'o', chr(195).chr(181) => 'o', |
576 | | chr(195).chr(182) => 'o', chr(195).chr(182) => 'o', |
577 | | chr(195).chr(185) => 'u', chr(195).chr(186) => 'u', |
578 | | chr(195).chr(187) => 'u', chr(195).chr(188) => 'u', |
579 | | chr(195).chr(189) => 'y', chr(195).chr(190) => 'th', |
580 | | chr(195).chr(191) => 'y', |
581 | | // Decompositions for Latin Extended-A |
582 | | chr(196).chr(128) => 'A', chr(196).chr(129) => 'a', |
583 | | chr(196).chr(130) => 'A', chr(196).chr(131) => 'a', |
584 | | chr(196).chr(132) => 'A', chr(196).chr(133) => 'a', |
585 | | chr(196).chr(134) => 'C', chr(196).chr(135) => 'c', |
586 | | chr(196).chr(136) => 'C', chr(196).chr(137) => 'c', |
587 | | chr(196).chr(138) => 'C', chr(196).chr(139) => 'c', |
588 | | chr(196).chr(140) => 'C', chr(196).chr(141) => 'c', |
589 | | chr(196).chr(142) => 'D', chr(196).chr(143) => 'd', |
590 | | chr(196).chr(144) => 'D', chr(196).chr(145) => 'd', |
591 | | chr(196).chr(146) => 'E', chr(196).chr(147) => 'e', |
592 | | chr(196).chr(148) => 'E', chr(196).chr(149) => 'e', |
593 | | chr(196).chr(150) => 'E', chr(196).chr(151) => 'e', |
594 | | chr(196).chr(152) => 'E', chr(196).chr(153) => 'e', |
595 | | chr(196).chr(154) => 'E', chr(196).chr(155) => 'e', |
596 | | chr(196).chr(156) => 'G', chr(196).chr(157) => 'g', |
597 | | chr(196).chr(158) => 'G', chr(196).chr(159) => 'g', |
598 | | chr(196).chr(160) => 'G', chr(196).chr(161) => 'g', |
599 | | chr(196).chr(162) => 'G', chr(196).chr(163) => 'g', |
600 | | chr(196).chr(164) => 'H', chr(196).chr(165) => 'h', |
601 | | chr(196).chr(166) => 'H', chr(196).chr(167) => 'h', |
602 | | chr(196).chr(168) => 'I', chr(196).chr(169) => 'i', |
603 | | chr(196).chr(170) => 'I', chr(196).chr(171) => 'i', |
604 | | chr(196).chr(172) => 'I', chr(196).chr(173) => 'i', |
605 | | chr(196).chr(174) => 'I', chr(196).chr(175) => 'i', |
606 | | chr(196).chr(176) => 'I', chr(196).chr(177) => 'i', |
607 | | chr(196).chr(178) => 'IJ',chr(196).chr(179) => 'ij', |
608 | | chr(196).chr(180) => 'J', chr(196).chr(181) => 'j', |
609 | | chr(196).chr(182) => 'K', chr(196).chr(183) => 'k', |
610 | | chr(196).chr(184) => 'k', chr(196).chr(185) => 'L', |
611 | | chr(196).chr(186) => 'l', chr(196).chr(187) => 'L', |
612 | | chr(196).chr(188) => 'l', chr(196).chr(189) => 'L', |
613 | | chr(196).chr(190) => 'l', chr(196).chr(191) => 'L', |
614 | | chr(197).chr(128) => 'l', chr(197).chr(129) => 'L', |
615 | | chr(197).chr(130) => 'l', chr(197).chr(131) => 'N', |
616 | | chr(197).chr(132) => 'n', chr(197).chr(133) => 'N', |
617 | | chr(197).chr(134) => 'n', chr(197).chr(135) => 'N', |
618 | | chr(197).chr(136) => 'n', chr(197).chr(137) => 'N', |
619 | | chr(197).chr(138) => 'n', chr(197).chr(139) => 'N', |
620 | | chr(197).chr(140) => 'O', chr(197).chr(141) => 'o', |
621 | | chr(197).chr(142) => 'O', chr(197).chr(143) => 'o', |
622 | | chr(197).chr(144) => 'O', chr(197).chr(145) => 'o', |
623 | | chr(197).chr(146) => 'OE',chr(197).chr(147) => 'oe', |
624 | | chr(197).chr(148) => 'R',chr(197).chr(149) => 'r', |
625 | | chr(197).chr(150) => 'R',chr(197).chr(151) => 'r', |
626 | | chr(197).chr(152) => 'R',chr(197).chr(153) => 'r', |
627 | | chr(197).chr(154) => 'S',chr(197).chr(155) => 's', |
628 | | chr(197).chr(156) => 'S',chr(197).chr(157) => 's', |
629 | | chr(197).chr(158) => 'S',chr(197).chr(159) => 's', |
630 | | chr(197).chr(160) => 'S', chr(197).chr(161) => 's', |
631 | | chr(197).chr(162) => 'T', chr(197).chr(163) => 't', |
632 | | chr(197).chr(164) => 'T', chr(197).chr(165) => 't', |
633 | | chr(197).chr(166) => 'T', chr(197).chr(167) => 't', |
634 | | chr(197).chr(168) => 'U', chr(197).chr(169) => 'u', |
635 | | chr(197).chr(170) => 'U', chr(197).chr(171) => 'u', |
636 | | chr(197).chr(172) => 'U', chr(197).chr(173) => 'u', |
637 | | chr(197).chr(174) => 'U', chr(197).chr(175) => 'u', |
638 | | chr(197).chr(176) => 'U', chr(197).chr(177) => 'u', |
639 | | chr(197).chr(178) => 'U', chr(197).chr(179) => 'u', |
640 | | chr(197).chr(180) => 'W', chr(197).chr(181) => 'w', |
641 | | chr(197).chr(182) => 'Y', chr(197).chr(183) => 'y', |
642 | | chr(197).chr(184) => 'Y', chr(197).chr(185) => 'Z', |
643 | | chr(197).chr(186) => 'z', chr(197).chr(187) => 'Z', |
644 | | chr(197).chr(188) => 'z', chr(197).chr(189) => 'Z', |
645 | | chr(197).chr(190) => 'z', chr(197).chr(191) => 's', |
646 | | // Decompositions for Latin Extended-B |
647 | | chr(200).chr(152) => 'S', chr(200).chr(153) => 's', |
648 | | chr(200).chr(154) => 'T', chr(200).chr(155) => 't', |
649 | | // Euro Sign |
650 | | chr(226).chr(130).chr(172) => 'E', |
651 | | // GBP (Pound) Sign |
652 | | chr(194).chr(163) => ''); |
653 | | |
654 | | $string = strtr($string, $chars); |
| 567 | // Decompositions for Latin-1 Supplement |
| 568 | chr(195).chr(128) => 'A', chr(195).chr(129) => 'A', |
| 569 | chr(195).chr(130) => 'A', chr(195).chr(131) => 'A', |
| 570 | chr(195).chr(132) => 'A', chr(195).chr(133) => 'A', |
| 571 | chr(195).chr(134) => 'AE',chr(195).chr(135) => 'C', |
| 572 | chr(195).chr(136) => 'E', chr(195).chr(137) => 'E', |
| 573 | chr(195).chr(138) => 'E', chr(195).chr(139) => 'E', |
| 574 | chr(195).chr(140) => 'I', chr(195).chr(141) => 'I', |
| 575 | chr(195).chr(142) => 'I', chr(195).chr(143) => 'I', |
| 576 | chr(195).chr(144) => 'D', chr(195).chr(145) => 'N', |
| 577 | chr(195).chr(146) => 'O', chr(195).chr(147) => 'O', |
| 578 | chr(195).chr(148) => 'O', chr(195).chr(149) => 'O', |
| 579 | chr(195).chr(150) => 'O', chr(195).chr(153) => 'U', |
| 580 | chr(195).chr(154) => 'U', chr(195).chr(155) => 'U', |
| 581 | chr(195).chr(156) => 'U', chr(195).chr(157) => 'Y', |
| 582 | chr(195).chr(158) => 'TH',chr(195).chr(159) => 's', |
| 583 | chr(195).chr(160) => 'a', chr(195).chr(161) => 'a', |
| 584 | chr(195).chr(162) => 'a', chr(195).chr(163) => 'a', |
| 585 | chr(195).chr(164) => 'a', chr(195).chr(165) => 'a', |
| 586 | chr(195).chr(166) => 'ae',chr(195).chr(167) => 'c', |
| 587 | chr(195).chr(168) => 'e', chr(195).chr(169) => 'e', |
| 588 | chr(195).chr(170) => 'e', chr(195).chr(171) => 'e', |
| 589 | chr(195).chr(172) => 'i', chr(195).chr(173) => 'i', |
| 590 | chr(195).chr(174) => 'i', chr(195).chr(175) => 'i', |
| 591 | chr(195).chr(176) => 'd', chr(195).chr(177) => 'n', |
| 592 | chr(195).chr(178) => 'o', chr(195).chr(179) => 'o', |
| 593 | chr(195).chr(180) => 'o', chr(195).chr(181) => 'o', |
| 594 | chr(195).chr(182) => 'o', chr(195).chr(182) => 'o', |
| 595 | chr(195).chr(185) => 'u', chr(195).chr(186) => 'u', |
| 596 | chr(195).chr(187) => 'u', chr(195).chr(188) => 'u', |
| 597 | chr(195).chr(189) => 'y', chr(195).chr(190) => 'th', |
| 598 | chr(195).chr(191) => 'y', |
| 599 | // Decompositions for Latin Extended-A |
| 600 | chr(196).chr(128) => 'A', chr(196).chr(129) => 'a', |
| 601 | chr(196).chr(130) => 'A', chr(196).chr(131) => 'a', |
| 602 | chr(196).chr(132) => 'A', chr(196).chr(133) => 'a', |
| 603 | chr(196).chr(134) => 'C', chr(196).chr(135) => 'c', |
| 604 | chr(196).chr(136) => 'C', chr(196).chr(137) => 'c', |
| 605 | chr(196).chr(138) => 'C', chr(196).chr(139) => 'c', |
| 606 | chr(196).chr(140) => 'C', chr(196).chr(141) => 'c', |
| 607 | chr(196).chr(142) => 'D', chr(196).chr(143) => 'd', |
| 608 | chr(196).chr(144) => 'D', chr(196).chr(145) => 'd', |
| 609 | chr(196).chr(146) => 'E', chr(196).chr(147) => 'e', |
| 610 | chr(196).chr(148) => 'E', chr(196).chr(149) => 'e', |
| 611 | chr(196).chr(150) => 'E', chr(196).chr(151) => 'e', |
| 612 | chr(196).chr(152) => 'E', chr(196).chr(153) => 'e', |
| 613 | chr(196).chr(154) => 'E', chr(196).chr(155) => 'e', |
| 614 | chr(196).chr(156) => 'G', chr(196).chr(157) => 'g', |
| 615 | chr(196).chr(158) => 'G', chr(196).chr(159) => 'g', |
| 616 | chr(196).chr(160) => 'G', chr(196).chr(161) => 'g', |
| 617 | chr(196).chr(162) => 'G', chr(196).chr(163) => 'g', |
| 618 | chr(196).chr(164) => 'H', chr(196).chr(165) => 'h', |
| 619 | chr(196).chr(166) => 'H', chr(196).chr(167) => 'h', |
| 620 | chr(196).chr(168) => 'I', chr(196).chr(169) => 'i', |
| 621 | chr(196).chr(170) => 'I', chr(196).chr(171) => 'i', |
| 622 | chr(196).chr(172) => 'I', chr(196).chr(173) => 'i', |
| 623 | chr(196).chr(174) => 'I', chr(196).chr(175) => 'i', |
| 624 | chr(196).chr(176) => 'I', chr(196).chr(177) => 'i', |
| 625 | chr(196).chr(178) => 'IJ',chr(196).chr(179) => 'ij', |
| 626 | chr(196).chr(180) => 'J', chr(196).chr(181) => 'j', |
| 627 | chr(196).chr(182) => 'K', chr(196).chr(183) => 'k', |
| 628 | chr(196).chr(184) => 'k', chr(196).chr(185) => 'L', |
| 629 | chr(196).chr(186) => 'l', chr(196).chr(187) => 'L', |
| 630 | chr(196).chr(188) => 'l', chr(196).chr(189) => 'L', |
| 631 | chr(196).chr(190) => 'l', chr(196).chr(191) => 'L', |
| 632 | chr(197).chr(128) => 'l', chr(197).chr(129) => 'L', |
| 633 | chr(197).chr(130) => 'l', chr(197).chr(131) => 'N', |
| 634 | chr(197).chr(132) => 'n', chr(197).chr(133) => 'N', |
| 635 | chr(197).chr(134) => 'n', chr(197).chr(135) => 'N', |
| 636 | chr(197).chr(136) => 'n', chr(197).chr(137) => 'N', |
| 637 | chr(197).chr(138) => 'n', chr(197).chr(139) => 'N', |
| 638 | chr(197).chr(140) => 'O', chr(197).chr(141) => 'o', |
| 639 | chr(197).chr(142) => 'O', chr(197).chr(143) => 'o', |
| 640 | chr(197).chr(144) => 'O', chr(197).chr(145) => 'o', |
| 641 | chr(197).chr(146) => 'OE',chr(197).chr(147) => 'oe', |
| 642 | chr(197).chr(148) => 'R',chr(197).chr(149) => 'r', |
| 643 | chr(197).chr(150) => 'R',chr(197).chr(151) => 'r', |
| 644 | chr(197).chr(152) => 'R',chr(197).chr(153) => 'r', |
| 645 | chr(197).chr(154) => 'S',chr(197).chr(155) => 's', |
| 646 | chr(197).chr(156) => 'S',chr(197).chr(157) => 's', |
| 647 | chr(197).chr(158) => 'S',chr(197).chr(159) => 's', |
| 648 | chr(197).chr(160) => 'S', chr(197).chr(161) => 's', |
| 649 | chr(197).chr(162) => 'T', chr(197).chr(163) => 't', |
| 650 | chr(197).chr(164) => 'T', chr(197).chr(165) => 't', |
| 651 | chr(197).chr(166) => 'T', chr(197).chr(167) => 't', |
| 652 | chr(197).chr(168) => 'U', chr(197).chr(169) => 'u', |
| 653 | chr(197).chr(170) => 'U', chr(197).chr(171) => 'u', |
| 654 | chr(197).chr(172) => 'U', chr(197).chr(173) => 'u', |
| 655 | chr(197).chr(174) => 'U', chr(197).chr(175) => 'u', |
| 656 | chr(197).chr(176) => 'U', chr(197).chr(177) => 'u', |
| 657 | chr(197).chr(178) => 'U', chr(197).chr(179) => 'u', |
| 658 | chr(197).chr(180) => 'W', chr(197).chr(181) => 'w', |
| 659 | chr(197).chr(182) => 'Y', chr(197).chr(183) => 'y', |
| 660 | chr(197).chr(184) => 'Y', chr(197).chr(185) => 'Z', |
| 661 | chr(197).chr(186) => 'z', chr(197).chr(187) => 'Z', |
| 662 | chr(197).chr(188) => 'z', chr(197).chr(189) => 'Z', |
| 663 | chr(197).chr(190) => 'z', chr(197).chr(191) => 's', |
| 664 | // Decompositions for Latin Extended-B |
| 665 | chr(200).chr(152) => 'S', chr(200).chr(153) => 's', |
| 666 | chr(200).chr(154) => 'T', chr(200).chr(155) => 't', |
| 667 | // Euro Sign |
| 668 | chr(226).chr(130).chr(172) => 'E', |
| 669 | // GBP (Pound) Sign |
| 670 | chr(194).chr(163) => '' |
| 671 | ); |
| 672 | } elseif ( 'latin-1' === $table ) { |
| 673 | $chars = array( |
| 674 | chr(128) => 'E', chr(131) => 'f', |
| 675 | chr(138) => 'S', chr(140) => 'OE', |
| 676 | chr(142) => 'Z', chr(154) => 's', |
| 677 | chr(156) => 'oe', chr(158) => 'z', |
| 678 | chr(159) => 'Y', chr(162) => 'c', |
| 679 | chr(165) => 'Y', chr(181) => 'u', |
| 680 | chr(192) => 'A', chr(193) => 'A', |
| 681 | chr(194) => 'A', chr(195) => 'A', |
| 682 | chr(196) => 'A', chr(197) => 'A', |
| 683 | chr(198) => 'AE', chr(199) => 'C', |
| 684 | chr(200) => 'E', chr(201) => 'E', |
| 685 | chr(202) => 'E', chr(203) => 'E', |
| 686 | chr(204) => 'I', chr(205) => 'I', |
| 687 | chr(206) => 'I', chr(207) => 'I', |
| 688 | chr(209) => 'N', chr(208) => 'DH', |
| 689 | chr(210) => 'O', chr(211) => 'O', |
| 690 | chr(212) => 'O', chr(213) => 'O', |
| 691 | chr(214) => 'O', chr(216) => 'O', |
| 692 | chr(217) => 'U', chr(218) => 'U', |
| 693 | chr(219) => 'U', chr(220) => 'U', |
| 694 | chr(221) => 'Y', chr(222) => 'TH', |
| 695 | chr(223) => 'ss', chr(224) => 'a', |
| 696 | chr(225) => 'a', chr(226) => 'a', |
| 697 | chr(227) => 'a', chr(228) => 'a', |
| 698 | chr(229) => 'a', chr(230) => 'ae', |
| 699 | chr(231) => 'c', chr(232) => 'e', |
| 700 | chr(233) => 'e', chr(234) => 'e', |
| 701 | chr(235) => 'e', chr(236) => 'i', |
| 702 | chr(237) => 'i', chr(238) => 'i', |
| 703 | chr(239) => 'i', chr(240) => 'dh', |
| 704 | chr(241) => 'n', chr(242) => 'o', |
| 705 | chr(243) => 'o', chr(244) => 'o', |
| 706 | chr(245) => 'o', chr(246) => 'o', |
| 707 | chr(248) => 'o', chr(249) => 'u', |
| 708 | chr(250) => 'u', chr(251) => 'u', |
| 709 | chr(252) => 'u', chr(253) => 'y', |
| 710 | chr(254) => 'th', chr(255) => 'y' |
| 711 | ); |