public static function normalizePercentReal($hexchr)
    {
        // 6.2.2.1.  Case Normalization
        // Percent-encoded characters must use uppercase letters.
        // 6.2.2.2.  Percent-Encoding Normalization
        $unreserved =   'ABCDEFGHIJKLMNOPQRSTUVWXYZ'.
                        'abcdefghijklmnopqrstuvwxyz'.
                        '-._~';

        $chr = chr(hexdec($hexchr[1]));
        if (strpos($unreserved, $chr) !== false) {
            return $chr;
        }
        return '%' . strtoupper($hexchr[1]);
    }
public static function normalizePercentReal($hexchr)
    {
        // 6.2.2.1.  Case Normalization
        // Percent-encoded characters must use uppercase letters.
        // 6.2.2.2.  Percent-Encoding Normalization
        $unreserved =   'ABCDEFGHIJKLMNOPQRSTUVWXYZ'.
                        'abcdefghijklmnopqrstuvwxyz'.
                        '-._~';

        $chr = chr(hexdec($hexchr[1]));
        if (strpos($unreserved, $chr) !== false) {
            return $chr;
        }
        return '%' . strtoupper($hexchr[1]);
    }
public static function normalizePercentReal ( $ hexchr ) { // 6.2.2.1.  Case Normalization // Percent-encoded characters must use uppercase letters. // 6.2.2.2.  Percent-Encoding Normalization $ unreserved = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' . 'abcdefghijklmnopqrstuvwxyz' . '-._~' ; $ chr = chr ( hexdec ( $ hexchr [ 1 ] ) ) ; if ( strpos ( $ unreserved , $ chr ) !== false ) { return $ chr ; } return '%' . strtoupper ( $ hexchr [ 1 ] ) ; }
Performs normalization of a percent-encoded character.

\param string $hexchr
One percent-encoded character that needs to be normalized.

\retval string
The same text, after percent-encoding normalization.
Performs normalization of a percent - encoded character .