Bug 403313 - Encoding problem on kmail2 5.10.1 when creating composer from command line
Summary: Encoding problem on kmail2 5.10.1 when creating composer from command line
Status: RESOLVED FIXED
Alias: None
Product: kmail2
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-01-17 16:03 UTC by alfazaz
Modified: 2019-02-25 07:04 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 5.10.3


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description alfazaz 2019-01-17 16:03:18 UTC
SUMMARY

When I create a kmail composer window from command line, it gives bad characters in the body when they are not ascii ; it's annoying because creating a pre-filled window for editing is broken now. 
I think it's an encoding problem (it didn't happen before a latest upgrade...). I'm on the latest rolling release version of archlinux.

kmail2 5.10.1 (from kmail 18.12.1-1)
qt5 5.12.0-1

STEPS TO REPRODUCE

1. Open a terminal

2. Type in it 
kmail --subject Vélo --body "J'ai élevé à ma façon des vélos !"

OBSERVED RESULT
A kmail message editor is opened with a good subject (Vélo) but with this bad body :
J'ai élevé à ma façon des vélos !

EXPECTED RESULT
A kmail message editor opened with a good subject (Vélo) but also with a good body like this :
J'ai élevé à ma façon des vélos !

There is the same bug with the --msg option of kmail...

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Archlinux uptodate/Plasma desktop 5.14.5-2/kde 18.12.1
KDE Frameworks 5.54.0
Qt 5.12.0
Comment 1 Laurent Montel 2019-01-17 21:56:45 UTC
Git commit 3cebe77c92460505af04827defeb0a9e358ba00b by Laurent Montel.
Committed on 17/01/2019 at 21:56.
Pushed by mlaurent into branch 'Applications/18.12'.

Fix Bug 403313 - Encoding problem on kmail2 5.10.1 when creating composer from command line

FIXED-IN: 5.10.2

M  +1    -1    src/job/opencomposerjob.cpp

https://commits.kde.org/kmail/3cebe77c92460505af04827defeb0a9e358ba00b
Comment 2 alfazaz 2019-02-17 09:27:31 UTC
(In reply to Laurent Montel from comment #1)
> Git commit 3cebe77c92460505af04827defeb0a9e358ba00b by Laurent Montel.
> Committed on 17/01/2019 at 21:56.
> Pushed by mlaurent into branch 'Applications/18.12'.
> 
> Fix Bug 403313 - Encoding problem on kmail2 5.10.1 when creating composer
> from command line
> 
> FIXED-IN: 5.10.2
> 
> M  +1    -1    src/job/opencomposerjob.cpp
> 
> https://commits.kde.org/kmail/3cebe77c92460505af04827defeb0a9e358ba00b

I tested your commit on last archlinux update (with kmail 5.10.2) and it works for --subject and --body options but not for --msg option.

To reproduce the bug, open a terminal and type in it :

1. Create an utf8 text file (named bodytest.txt) with "J'ai élevé à ma façon des vélos !" in it.
2. Type in a terminal :
kmail --subject Vélo --msg bodytest.txt

OBSERVED RESULT
A kmail message editor is opened with a good subject (Vélo) but with this bad body :
J'ai élevé à ma façon des vélos !

EXPECTED RESULT
A kmail message editor opened with a good subject (Vélo) but also with a good body like this :
J'ai élevé à ma façon des vélos !

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Archlinux uptodate/Plasma desktop 5.15.0-1/kde 18.12.1
KDE Frameworks 5.55.0-1
Qt 5.12.1
Comment 3 Laurent Montel 2019-02-21 15:02:01 UTC
I confirm it.
I will fix it soon
Comment 4 alfazaz 2019-02-21 15:06:04 UTC
Ok, thanks !
Comment 5 Laurent Montel 2019-02-25 07:04:18 UTC
Git commit 893be637804d4f1e3478685314ede211001a888d by Laurent Montel.
Committed on 25/02/2019 at 07:03.
Pushed by mlaurent into branch 'Applications/18.12'.

Fix Bug 403313 - Encoding problem on kmail2 5.10.1 when creating composer from command line

FIXED-IN: 5.10.3

M  +1    -1    src/job/opencomposerjob.cpp

https://commits.kde.org/kmail/893be637804d4f1e3478685314ede211001a888d