After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 355766 - Multi-lang text in Body is not printed when composing in ASCII mode
Multi-lang text in Body is not printed when composing in ASCII mode
Status: RESOLVED FIXED
Product: evolution
Classification: Applications
Component: Mailer
2.8.x (obsolete)
Other All
: Normal major
: ---
Assigned To: evolution-mail-maintainers
Evolution QA team
: 349877 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2006-09-13 12:35 UTC by makuchaku (Mayank)
Modified: 2013-09-10 14:04 UTC
See Also:
GNOME target: ---
GNOME version: 2.15/2.16


Attachments
Patch to enable indic printing in ascii mails (4.36 KB, patch)
2006-09-13 12:36 UTC, makuchaku (Mayank)
none Details | Review
Revised patch (3.78 KB, patch)
2006-10-10 17:11 UTC, Matthew Barnes
rejected Details | Review
Revised patch (4.37 KB, patch)
2006-11-07 20:05 UTC, Matthew Barnes
none Details | Review
Revised patch (4.12 KB, patch)
2006-12-20 16:16 UTC, Matthew Barnes
committed Details | Review

Description makuchaku (Mayank) 2006-09-13 12:35:00 UTC
Please describe the problem:
Multi-lang text in Body is not printed when composing in ASCII mode. Headers (cc/bcc/to/etc) get printed perfectly, but body gets printed with either random cars or nothing.

Steps to reproduce:
1. Compose mail in Ascii format
2. Add काोेकाीेंक in the composer
3. Select print (or print preview) from the menu.


Actual results:
Nothing (or random characters) get printed from the body

Expected results:
printout should have been similar to what it was in body of the mail

Does this happen every time?
yes

Other information:
Printing from HTML mode works perfectly. Also, mails stored as drafts (in ascii mode) do not show this bug.
Comment 1 makuchaku (Mayank) 2006-09-13 12:36:38 UTC
Created attachment 72695 [details] [review]
Patch to enable indic printing in ascii mails

As I found from my initial investigation that saving drafts converts them in html mode & then printing is perfect.

Hence, I'm attaching a solution which is based on this approach.

Thanks,
Mayank
Comment 2 makuchaku (Mayank) 2006-09-13 12:37:04 UTC
Downstream bug - https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=202751
Comment 3 Srinivasa Ragavan 2006-09-25 09:02:07 UTC
Looks fine to commit.
Comment 4 makuchaku (Mayank) 2006-09-25 09:04:26 UTC
Thanks Srinivasa :)
Comment 5 André Klapper 2006-09-25 10:55:32 UTC
for the sake of better documentation, i'd love to see a gtk doc entry like the one for e_msg_composer_get_message - anyway, just nitpicking... :-)
Comment 6 makuchaku (Mayank) 2006-09-25 11:17:44 UTC
Hi Andre :)
Thats just a helper function, so i dont think a gtk style doc is reqd :)
Comment 7 André Klapper 2006-09-25 11:24:31 UTC
hmm... right. /me needs a coffee.
makuchaku, poke me again if you don't have commit permissions :-)
Comment 8 Matthew Barnes 2006-09-25 16:36:37 UTC
e_msg_composer_get_message_print() needs to be declared in e-msg-composer.h since it's called from another module, otherwise it's going to fail my -Werror-implicit-function-declaration test.  I'll take care of it.
Comment 9 Matthew Barnes 2006-09-25 16:50:59 UTC
Mayank,

e_msg_composer_get_message_print() takes a boolean argument named "save_html_object_data" but doesn't do anything with it.

But it calls:

   msg = build_message (composer, TRUE);

where the second argument of build_message() is also a boolean argument named "save_html_object_data".  Should it be passing the flag along?  If not, can we drop the unnecessary boolean argument?
Comment 10 makuchaku (Mayank) 2006-09-27 06:56:41 UTC
Hi Matthew,

I agree that what you are saying is true. I might have kept "save_html_object_data" just to keep the new call consistant with the old one. If removing this bool variable has no effect, please go ahead.

Thanks for pointing out this mistake, i'll be more carefull the next time.

:)
Mayank
Comment 11 Matthew Barnes 2006-10-10 17:11:25 UTC
Created attachment 74425 [details] [review]
Revised patch

Here's a slightly revised version of Mayank's original patch.  It declares the new function in e-msg-composer.h, and changes

-    msg = build_message (composer, TRUE);
+    msg = build_message (composer, save_html_object_data);

This approach is less disruptive than pruning dead "save_html_object_data" parameters caused by the hardcoded TRUE argument.

Mayank, are you okay with this version?
Comment 12 makuchaku (Mayank) 2006-10-10 17:46:27 UTC
Yup, looks fine :)
If it passes the testing, i have absolutely no problem :)

Matthew, thanks for clearing my mess.
Comment 13 Harish Krishnaswamy 2006-10-16 15:15:37 UTC
Marking the first patch as obsolete. 
Mailer hackers: Can you pl. review the updated patch ?
Comment 14 Matthew Barnes 2006-10-27 19:47:39 UTC
Stop reviewing.

This patch does fix the reported problem but it also makes Evolution send all email with both text/plain and text/html content, whether HTML is selected in the composer or not.

We need to find a different solution for this one.
Comment 15 Harish Krishnaswamy 2006-10-28 10:11:49 UTC
Update patch status per comment #14.
Comment 16 Matthew Barnes 2006-11-07 20:05:11 UTC
Created attachment 76171 [details] [review]
Revised patch

This patch seems to work better.  It avoids the previously mentioned side-effects.  Mayank came up with the solution and I just tidied up the logic a bit.
Comment 17 makuchaku (Mayank) 2006-12-20 10:24:18 UTC
Thanks Matthew :)
Comment 18 Matthew Barnes 2006-12-20 16:16:06 UTC
Created attachment 78697 [details] [review]
Revised patch

The first hunk in the previous patch was causing things like meeting requests to be sent as text/plain.  Here's a revised patch with the naughty bits snipped.
Comment 19 makuchaku (Mayank) 2006-12-21 16:49:28 UTC
*** Bug 349877 has been marked as a duplicate of this bug. ***
Comment 20 André Klapper 2007-05-15 16:11:32 UTC
Comment #20 From Matthew Barnes on 2006-11-07
I tidied up the logic a bit and verified that the reported problem as well as
the previous side-effects are fixed.  I'll submit a new patch upstream.
Fixed in evolution-2.9.2-2.fc7.

Comment #22 From Matthew Barnes on 2006-11-13
Bug #208803 (for RHEL-5) was verified and resolved with the same patch, so I'm
resolving this bug as well.  Feel free to re-open it if you still encounter the
problem or any of the documented side-effects from previous attempts.


so matthew, can we get this in for 2.11?
Comment 21 Srinivasa Ragavan 2007-07-03 07:01:10 UTC
Matthew, can you get this in for 2.11.5?
Comment 22 Matthew Barnes 2007-08-24 17:13:17 UTC
The patch was shipped with RHEL5 and passed QA testing.

Committed to trunk (revision 34099).