wp_iso_descrambler

Convert to ASCII from email subjects.

Description

(string) wp_iso_descrambler( (string) $string ); 

Returns (string)

Converted string to ASCII

Parameters (1)

0. $string (string)
Subject line

Usage

  1. if ( !function_exists( 'wp_iso_descrambler' ) ) { 
  2. require_once ABSPATH . WPINC . '/formatting.php'; 
  3.  
  4. // Subject line 
  5. $string = ''; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = wp_iso_descrambler($string); 
  9.  

Defined (1)

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

/wp-includes/formatting.php  
  1. function wp_iso_descrambler( $string ) { 
  2. /** this may only work with iso-8859-1, I'm afraid */ 
  3. if (!preg_match('#\=\?(.+)\?Q\?(.+)\?\=#i', $string, $matches)) { 
  4. return $string; 
  5. } else { 
  6. $subject = str_replace('_', ' ', $matches[2]); 
  7. return preg_replace_callback( '#\=([0-9a-f]{2})#i', '_wp_iso_convert', $subject );