WYSIJA_help_encoding

The MailPoet Newsletters WYSIJA help encoding class.

Defined (1)

The class is defined in the following location(s).

/helpers/encoding.php  
  1. class WYSIJA_help_encoding{ 
  2. function change($data, $input, $output) { 
  3. $input = strtoupper(trim($input)); 
  4. $output = strtoupper(trim($output)); 
  5. if($input == $output) return $data; 
  6. if ($input == 'UTF-8' && $output == 'ISO-8859-1') { 
  7. $data = str_replace(array('*', '*', '*'), array('EUR', '"', '"'), $data); 
  8. if (function_exists('iconv')) { 
  9. set_error_handler('acymailing_error_handler_encoding'); 
  10. $encodedData = iconv($input, $output."//IGNORE", $data); 
  11. restore_error_handler(); 
  12. if(!acymailing_error_handler_encoding('result')) { 
  13. return $encodedData; 
  14. if (function_exists('mb_convert_encoding')) { 
  15. return mb_convert_encoding($data, $output, $input); 
  16. if ($input == 'UTF-8' && $output == 'ISO-8859-1') { 
  17. return utf8_decode($data); 
  18. if ($input == 'ISO-8859-1' && $output == 'UTF-8') { 
  19. return utf8_encode($data); 
  20. return $data; 
  21. }//endclass