-
-
Notifications
You must be signed in to change notification settings - Fork 73
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
Comments
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. :) |
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 👍 |
Thanks.. What was the issue you found? |
@fawkesley bump. |
@fawkesley |
No worries! If I recall correctly, I implemented the necessary changes on my own fork to get things working. It wasn’t a clean patch as I had to fix the tests which were broken at the time.
|
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? |
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. |
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.
The text was updated successfully, but these errors were encountered: