AquaMail Forum

English - Android => Bug reports => Topic started by: vince on March 09, 2017, 08:27:00 pm

Title: Copy/Paste from other emails or texts inserts triple carriage return instead of
Post by: vince on March 09, 2017, 08:27:00 pm
Summary: Aquamail inserts extra blank lines/carriage returns between paragraphs that are copy/pasted from another mail message that came from Outlook

Urgency: Low.  It's just annoying having to delete extra spaces.

How it happens:
- I send an email from Outlook at work to my Aquamail on my phone.
- I copy a few paragraphs from that Outlook message and paste them into a new email that I'm drafting in Aquamail (to reuse text and avoid retyping)
- Aquamail pastes the text from the original Outlook message, but every paragraph has a triple return between them.
- I have to go between each paragraph and backspace 3 times to get a normal, single space between paragraphs.
- Does not happen when copy/pasting from other emails or webpages etc.  Just Outlook.

Title: Re: Copy/Paste from other emails or texts inserts triple carriage return instead of
Post by: KieSeyHow on March 09, 2017, 11:00:46 pm
Microsoft Office software is WELL-KNOWN for adding a lot of unecessary extra coding and clutter to their documents.  This is the fault of Outlook, not Aquamail.  There are even tools available for stripping this extra clutter out from Office files.   This is why Office documents are several times larger than other files.  This is also why Office is not really taken seriously by some people.  There are probably mobile tools for copying only text or cleaning text of formatting and embedded codes.


Sent from my SM-P900 using Tapatalk
Title: Re: Copy/Paste from other emails or texts inserts triple carriage return instead of
Post by: StR on March 10, 2017, 12:16:33 am
Outlook, indeed, produces some artifacts.

E.g., you might see a lonely "J" that appears where a smiley was put by the author:
http://chris.pirillo.com/2010/06/25/j-smiley-outlook-email-problem-and-fix/
And MS doesn't consider that being a problem:
https://www.buzzfeed.com/kasiagalazka/smiley-faces-js?utm_term=.aooypnLrZ#.ug1AQ3rRd

As for the specific problem, I suspect that it might be due to the difference between the end of line symbols on different OSes and different e-mail clients (^M vs ^J vs ^M^J aka CR vs LF vs CR LF), and how that is parsed by Aquamail (or WebView component on Android). I would suspect that Outlook might use ^M^J:
http://ergoemacs.org/emacs/emacs_line_ending_char.html
There could be also some additional effect from how the text is sent by Outlook (Format=Flowed vs. not), especially if it is a plain-text message.

Or, if it is an HTML-formatted message, the Outlook HTML idiosyncrasies could be the culprit, as pointed out by @KieSeyHow.

If you look at the "source" ("view source") of the e-mail message (say via the webinterface of your e-mail provider), you should be able to see how the end of lines are implemented in the offending messages.
Title: Re: Copy/Paste from other emails or texts inserts triple carriage return instead of
Post by: KieSeyHow on March 10, 2017, 01:25:57 am
Good post with some useful details for the OP.  Thanks for adding more info.

Sent from my SM-P900 using Tapatalk
Title: Re: Copy/Paste from other emails or texts inserts triple carriage return instead of
Post by: Kostya Vasilyev on March 10, 2017, 03:38:12 pm
It would help to have a sample message, you can send it as an .eml attachment to support / aqua-mail / dot com (please mention this post).

Now, the *copying* is done by Android code, and it usually errs on the side of adding too *few* line breaks:

https://code.google.com/p/android/issues/detail?id=24562
Title: Re: Copy/Paste from other emails or texts inserts triple carriage return instead of
Post by: KieSeyHow on March 11, 2017, 04:46:51 am
I think Outlook may add extra <div> containers for CSS formatting that are interpretted as blank paragraphs.  I have not tested this, it is just a guess based upon past experiences with Microsoft's proprietary code bloat.

Sent from my SM-P900 using Tapatalk