<?php /* ***** Polish (ISO-8859-2) to UTF-8 ****************************
* Copyright (c) 2005 Brian Huisman AKA GreyWyvern - v1.1
* PHP encoding converter from ISO-8859-2 to UTF-8
*
* Modified for PHP from the original Perl as taken from NexTrieve-0.41
* http://backpan.perl.org/authors/id/E/EL/ELIZABETH/NexTrieve-0.41.tar.gz
*
* Copyright (c) 1995-2003 Elizabeth Mattijsen <liz@dijkmat.nl>. All
* rights reserved.
* This program is free software; you can redistribute it and/or modify
* it under the same terms as Perl itself.
********************************************************************* */
function iso88592_2utf8($input) {
  static 
$iso88592;

  if (!
count($iso88592)) $iso88592 = array(
   
'€''''‚''ƒ''„''…''†''‡''ˆ''‰',
   
'Š''‹''Œ''''Ž''''''‘''’''“',
   
'”''•''–''—''˜''™''š''›''œ''',
   
'ž''Ÿ'' ''Ą''˘''Ł''¤''Ľ''Ś''§',
   
'¨''Š''Ş''Ť''Ź''­''Ž''Ż''°''ą',
   
'˛''ł''´''ľ''ś''ˇ''¸''š''ş''ť',
   
'ź''˝''ž''ż''Ŕ''Á''Â''Ă''Ä''Ĺ',
   
'Ć''Ç''Č''É''Ę''Ë''Ě''Í''Î''Ď',
   
'Đ''Ń''Ň''Ó''Ô''Ő''Ö''×''Ř''Ů',
   
'Ú''Ű''Ü''Ý''Ţ''ß''ŕ''á''â''ă',
   
'ä''ĺ''ć''ç''č''é''ę''ë''ě''í',
   
'î''ď''đ''ń''ň''ó''ô''ő''ö''÷',
   
'ř''ů''ú''ű''ü''ý''ţ''˙');

  return 
preg_replace("/([\x80-\xFF])/e"'$iso88592[ord($1) - 0x80]'$input);
?>