The problem is that USPS has started to send the weird characters and they don`t encode them properly.
Below is a fix that should work.
Edit: usps_20.php
Find:
/**
* USPS seems to be not able to encode their own XML appropriately
* This function is used to fix their mistakes.
* @author Greg Gullett ([email protected])
* @since 2.0
* @param string $response Reference to the $response string
*/
function _clean_response( &$response ) {
$bad_encoding = array( "<sup>&", ";</sup>" );
$good_encoding = array( "<sup>","</sup>" );
$response = str_replace( $bad_encoding, $good_encoding, $response );
}
Replace with:
/**
* USPS seems to be not able to encode their own XML appropriately
* This function is used to fix their mistakes.
* @author Greg Gullett ([email protected])
* @since 2.0
* @param string $response Reference to the $response string
*/
function _clean_response( &$response ) {
$response = str_replace('<sup>®</sup>',"",$response);
$response = str_replace('<sup>™</sup>',"",$response);
}