torchbox / wagtail-wordpress-import

A package for Wagtail CMS to import WordPress blog content from an XML file into Wagtail
MIT License
44 stars 16 forks source link

utf-8 url not decoded after import by wagtail-wordpress-import #172

Closed htabar closed 10 months ago

htabar commented 10 months ago

for wordpress urls that are utf-8 such as mywpsite.com/سلام, the converter provides hexadecimal-encoded characters as mywagtail.com/d8b3d984d8a7d985

it is not decoded



hex_string = "d8b3d984d8a7d985"

# Decode the hexadecimal string to bytes
bytes_data = bytes.fromhex(hex_string)

# Convert bytes to string using UTF-8 encoding
wagtail_url = bytes_data.decode("utf-8")
htabar commented 10 months ago

actually, this was a problem related to wp export, not wagtail import. resolved.