like below fixes the issue The sitemaps specification doesn't say. It shows examples of URLs in various escaped forms but does not definitively say whether the first example (raw characters) is allowable. It only calls them ‘URL’s, with no reference to a particular definition of ‘URL’ or RFC which would clarify whether they mean old-school ASCII URIs, or IRIs (which may contain non-ASCII characters). So it would be safest to %-escape the UTF-8 encoding of the URL. The link will then work globally, and should be presented to the user as a Unicode character in all modern browsers.
To fix the issue you can do Your output sample suggest you are looking for url encoding, not Latin-1. The urllib.quote() and urllib.quote_plus() functions can be used to do such quoting, but the - character does not need quoting and won't be quoted:
>>> from urllib import quote
>>> quote('some data that needs quoting!')