Fix encoding bug; normalize percent-encoded to uppercase.