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

Line folding can can break in the middle of a UNICODE character #7

Open
fawkesley opened this issue Mar 29, 2019 · 8 comments
Open

Comments

@fawkesley
Copy link
Contributor

Hello again!

I was struggling with a mysterious issue where a character in my calendar was getting mangled.

After quite a lot of research I pinned it down to the way serialize counts line length. The implementation allows it to break a line in the middle of a character.

For example, requires 3 bytes to encode. If it occurs on a line after 74 bytes, the folding routine breaks in the middle of it.

I've made a fix on my fork with some tests to pin down the behaviour:

fawkesley@67e08db

Happy to raise a pull request (in a rush atm), but just wanted to show you what I found for now.

@arran4
Copy link
Owner

arran4 commented Mar 29, 2019

Hi Paul,

Thanks again! I would have gotten away with it too if it wasn't for the meddling rest-of-the-world. Okay. I have read the RFC and glanced at your code. I'm happy with your approach. Just a couple things I added comments on.. Please submit the PR when ready. :)

@fawkesley
Copy link
Contributor Author

Haha yes, these pesky users! Thanks again for making it, it's been a really helpful start. You might like to know we're using it to power the iCal feed for the Internet freedom festival

I've found another issue with the new folding approach (it should escape newlines I think). Once I'm more confident it's working correctly for different cases I'll open a PR 👍

@arran4
Copy link
Owner

arran4 commented Apr 19, 2019

Thanks..

What was the issue you found?

@arran4
Copy link
Owner

arran4 commented Sep 13, 2020

@fawkesley bump.

@arran4
Copy link
Owner

arran4 commented Jan 15, 2022

@fawkesley
I will close this on or after the 15th of February if I haven't heard from you.

@fawkesley
Copy link
Contributor Author

fawkesley commented Jan 18, 2022 via email

@arran4
Copy link
Owner

arran4 commented Jan 23, 2022

Ah.. Did you want to fix it up, then create a draft PR and link me so I can have a look at the diff?

@arran4
Copy link
Owner

arran4 commented Oct 16, 2024

Do you have any tests which prove if this is still an issue? I am happy to incorporate them and try fix them? I remember someone doing some work along these lines.

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

No branches or pull requests

2 participants