Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unicode characters in podcast information can cause OPML export to fail #215

Open
Keeper-of-the-Keys opened this issue Feb 3, 2025 · 0 comments
Assignees
Labels

Comments

@Keeper-of-the-Keys
Copy link
Contributor

Discovered today with https://podcast.thelinuxexp.com/@tlenewspodcast

He uses \u2019 for ' in the description.

Caused the following error:

WARNING:gpodder.util:Exception while atomic-saving file: 'ascii' codec can't encode character '\u2019' in position 2086: ordinal not in range(128)
Traceback (most recent call last):
  File "/usr/share/harbour-org.gpodder.sailfish/gpodder/util.py", line 817, in update_file_safely
    yield tmp_filename
  File "/usr/share/harbour-org.gpodder.sailfish/gpodder/opml.py", line 202, in write
    fp.write(doc.toprettyxml(indent='  ', newl=os.linesep))
UnicodeEncodeError: 'ascii' codec can't encode character '\u2019' in position 2086: ordinal not in range(128)
ERROR:gpodder.opml:Could not open file for writing: /home/defaultuser/Documents/test.opml
Traceback (most recent call last):
  File "/usr/share/harbour-org.gpodder.sailfish/gpodder/opml.py", line 202, in write
    fp.write(doc.toprettyxml(indent='  ', newl=os.linesep))
UnicodeEncodeError: 'ascii' codec can't encode character '\u2019' in position 2086: ordinal not in range(128)

Solution is probably to move to utf-8 instead of ascii, not sure if this is an issue in gpodder or the libraries being used, will investigate more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant