Fix for urlencode expecting non-Unicode strings.