wp_iso_descrambler() WordPress Function

The wp_iso_descrambler() function is used to descramble data that has been encoded using the ISO-2022-JP standard. This function is typically used to decode data that has been sent via email or other text-based communication channels.

wp_iso_descrambler( string $string ) #

Converts to ASCII from email subjects.


Parameters

$string

(string)(Required)Subject line.


Top ↑

Return

(string) Converted string to ASCII.


Top ↑

Source

File: wp-includes/formatting.php

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

Top ↑

Changelog

Changelog
VersionDescription
1.2.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More