Bug 70796 - MAILMERGE: Greek letter υ (lower Upsilon) error when sending plain-text or html emails
Summary: MAILMERGE: Greek letter υ (lower Upsilon) error when sending plain-text or ht...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.1.2.3 release
Hardware: Other Linux (All)
: medium normal
Assignee: Andras Timar
URL:
Whiteboard: BSA target:4.3.0 target:4.2.1
Keywords:
Depends on:
Blocks:
 
Reported: 2013-10-23 10:04 UTC by Spiros Georgaras
Modified: 2014-01-16 15:26 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
zip file with plain text email, html email, greek letters image (lower upsilon in red) (11.31 KB, application/zip)
2013-10-23 10:04 UTC, Spiros Georgaras
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Spiros Georgaras 2013-10-23 10:04:18 UTC
Created attachment 88029 [details]
zip file with plain text email, html email, greek letters image (lower upsilon in red)

Problem description: Greek letter υ (lower Upsilon) is malformed in plain-text and html emails created by mail-merge

Steps to reproduce:
1. include letter υ (lower Upsilon) in a paragraph
2. select to send plain-text or html email


Current behavior: see attached docs

Expected behavior: see attached docs

              
Operating System: Debian
Version: 4.1.2.3 release
Comment 1 Spiros Georgaras 2013-10-23 11:33:18 UTC
I just took a closer look, and this is what i have

original text: ς,ε,ρ,τ,υ

1. html email
=CF=82,=CE=B5,=CF=81,=CF=84,=CF
,=CE=B8

2. plain text (to HEX)

CF 82 2C CE B5 2C CF 81 2C CF 84 2C CF 0D 0A 2C CE B8 (2C=",")

So in both cases instead of CF 85 (upsilon) we have CF 0D 0A
Comment 2 Andras Timar 2014-01-09 12:53:02 UTC
It is a bug in Python 3. Try this sample script:

# coding=utf-8
import email
import email.charset
import email.message

c = email.charset.Charset('utf-8')
c.body_encoding = email.charset.QP
m = email.message.Message()
m.set_payload("This is a Greek letter upsilon: υ", c)
print(m.as_string())

Actual result: "This is a Greek letter upsilon: =CF" 
Expected result: "This is a Greek letter upsilon: =CF=85"

As a workaround, we could use base64 instead of quoted-printable.
Comment 3 Andras Timar 2014-01-13 10:10:26 UTC
See also: http://bugs.python.org/issue20206
Comment 4 Commit Notification 2014-01-15 08:34:31 UTC
Andras Timar committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=65be22476b586637ecccc6b96fab187e5933cd00

fdo#70796 fix quoted printable encoding bug in internal Python



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 5 Caolán McNamara 2014-01-15 14:48:05 UTC
I assume the above commit fixes the problem
Comment 6 Andras Timar 2014-01-15 15:18:53 UTC
(In reply to comment #5)
> I assume the above commit fixes the problem

Yes, but obviously only for builds that use internal Python.
Comment 7 Commit Notification 2014-01-16 15:26:58 UTC
Andras Timar committed a patch related to this issue.
It has been pushed to "libreoffice-4-2":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=00fc621899ccca1e316e956796d978210d324c5f&h=libreoffice-4-2

fdo#70796 fix quoted printable encoding bug in internal Python


It will be available in LibreOffice 4.2.1.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.