improved Url::getEncodingType() method