Closed adriangibanelbtactic closed 2 years ago
I brought this fix because some of the subjects were not padded properly.
Also using just a line as hinted by https://stackoverflow.com/a/43939328 was a good thing. No longer was needed to use three extra functions.
Now I see that some of the subjects are still not padded properly, probably because of chinese characters.
I'm currently checking: https://stackoverflow.com/questions/4622357/how-to-control-padding-of-unicode-string-containing-east-asia-characters and https://pythonhosted.org/kitchen/api-text-display.html to see if it's a better approach.
I brought this fix because some of the subjects were not padded properly.
Also using just a line as hinted by https://stackoverflow.com/a/43939328 was a good thing. No longer was needed to use three extra functions.
Now I see that some of the subjects are still not padded properly, probably because of chinese characters.
I'm currently checking: https://stackoverflow.com/questions/4622357/how-to-control-padding-of-unicode-string-containing-east-asia-characters and https://pythonhosted.org/kitchen/api-text-display.html to see if it's a better approach.
It seems that my problem is specifically related to non printable characters. Those non printable characters messed up with the string length (string length versus the length you get in the screen once you print it).
Removing control characters from the subject line is probably the way to go:
Ok, I am now satisfied with the last fix.
You can review this pull request.
Thank you.
Thanks.
Now the subject has always the 30 character length size with much less code.
This pull request builds on https://github.com/rgladwell/imap-upload/pull/52 so it's meant to be approved once the former pull request has been merged into upstream.