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

agenda --tsv and agendaupdate: handle control and escape characters consistently #828

Open
3 tasks
michaelmhoffman opened this issue Jan 31, 2025 · 1 comment
Labels

Comments

@michaelmhoffman
Copy link
Collaborator

agenda --tsv replaces newlines in text to be printed with r'\n'. This is necessary to avoid totally breaking anything downstream when newlines occur in event properties. This is common for description.

agenda --tsv should also:

  • replace tabs with r'\t'
  • replace backslashes with r'\\'

Furthermore:

  • agendaupdate should reverse these escapes
@michaelmhoffman
Copy link
Collaborator Author

michaelmhoffman commented Jan 31, 2025

The unicode_escape codec will do these replacements, but it will also replace other non-Latin-1 codepoints with escapes. That seems undesirable, so better to do our own replacement when producing output. I'm not sure that there are any disadvantages to using it when reading things in, though.

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