By default, Bugzilla does not search the list of RESOLVED bugs.
You can force it to do so by putting the upper-case word ALL in front of your search query, e.g.: ALL tdelibs
We recommend searching for bugs this way, as you may discover that your bug has already been resolved and fixed in a later release.
Bug 2660 - UTF mangling in tdepim/libkcal/icalformat.cpp
Summary: UTF mangling in tdepim/libkcal/icalformat.cpp
Status: RESOLVED FIXED
Alias: None
Product: TDE
Classification: Unclassified
Component: tdepim (show other bugs)
Version: R14.0.1 [Trinity]
Hardware: amd64 Linux
: P5 major
Assignee: Timothy Pearson
URL:
Depends on:
Blocks: R14.0.4
  Show dependency treegraph
 
Reported: 2016-05-28 09:44 CDT by deloptes
Modified: 2016-10-15 19:45 CDT (History)
3 users (show)

See Also:
Compiler Version:
TDE Version String:
Application Version:
Application Name:


Attachments
fix from/to utf8 file and data (10.00 KB, application/octet_stream)
2016-05-28 09:44 CDT, deloptes
Details
fix from/to utf8 file and data + add testing to CMake (8.47 KB, patch)
2016-05-28 10:29 CDT, deloptes
Details | Diff
fix from/to utf8 file and data + add testing to CMake (9.01 KB, patch)
2016-05-29 15:06 CDT, deloptes
Details | Diff
fix from/to utf8 file and data + add testing to CMake (10.69 KB, patch)
2016-06-17 09:56 CDT, deloptes
Details | Diff
cmake: add libkcal tests during building (7.92 KB, patch)
2016-10-12 20:24 CDT, Slávek Banko
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description deloptes 2016-05-28 09:44:39 CDT
Created attachment 2666 [details]
fix from/to utf8 file and data

I start looking into this because I had some strange utf8 mangling in my todos.
I hope this will help solve it (not tested yet)
Comment 1 deloptes 2016-05-28 10:29:44 CDT
Created attachment 2667 [details]
fix from/to utf8 file and data + add testing to CMake
Comment 2 deloptes 2016-05-29 15:06:53 CDT
Created attachment 2668 [details]
fix from/to utf8 file and data + add testing to CMake

Unfortunately in the source directory I used to create the previous diff, there was the CMakeLists.txt which I created.
I was not able to pull again from git for some reason. This patch will include the CMakeLists.txt to the tests directory in libikcal

regards
Comment 3 Slávek Banko 2016-06-02 20:04:06 CDT
I did a cursory test and it seems to be all right. You have tested whether it solves the problem that you observed?
Comment 4 deloptes 2016-06-03 11:14:13 CDT
Yes I tested it, but not sure if the problem is solved. However I do not see it happening. It was rare when creating a TODO in UTF8 - sync with phone - on phone OK, but after change on phone and sync back - there were extra "\n" and "=" in the subject in kcal.
I have tried it few times but no issue and I think it is because/when it writes/read to/from tmp file KSaveFile and the UTF8/Latin1 we had before.
I'm just not sure if this is the proper way to fix the KSaveFile

The other part is fine - just ported the tests to CMake. Could someone answer the question how we define check-local target, so that we have standard unified solution for that. I would port other testing as well.
Comment 5 deloptes 2016-06-17 09:56:10 CDT
Created attachment 2669 [details]
fix from/to utf8 file and data + add testing to CMake

This is same as v5 but better in that INPUT and KDETOPSRCDIR are set only for the test files requiring it.

I am on it again as I want to understand why SUMMARY and DESCRIPTION have issues with cyrillic (and probably other UTF symbols).
My goal is to have a test case to reproduce it and fix it, so this patch will be not the latest here.
Comment 6 deloptes 2016-10-10 16:43:26 CDT
The patch here and in bug 2688[1] seem to solve the issue. There was additional issue specific to N9 and SyncML which we solved in syncevolution parser 98019 [2].
So I consider this as solved.

[1] http://bugs.pearsoncomputing.net/show_bug.cgi?id=2688
[2] https://bugs.freedesktop.org/show_bug.cgi?id=98019
Comment 7 Slávek Banko 2016-10-12 20:24:15 CDT
Created attachment 2729 [details]
cmake: add libkcal tests during building

I split a patch for fix utf8 handling and for cmake testing. I also redid cmake testing in the same sense as recently vcardparser testing in tdelibs.  But I did not push the patch now, because the tests fails.

By the way, instead of:

SET_TARGET_PROPERTIES( target
 PROPERTIES COMPILE_FLAGS -DVAR=VALUE )

is better to use 

set_property(
  TARGET _target_
  APPEND PROPERTY COMPILE_DEFINITIONS
  VAR=VALUE
)

Because in the second case, CMake automatically ensures the correct backslashing of quotes. See attached patch.
Comment 8 Slávek Banko 2016-10-12 20:25:57 CDT
Patch to fix utf8 handling was pushed to GIT in hash 63c4d2db (master) and 12257d6a (r14.0.x).
Comment 9 deloptes 2016-10-13 02:39:10 CDT
Hi Slavek,
yes the tests fail because some datetime altering issue, I could not chase to the bottom.
Does it mean your patch fixes this behavior? I assume yes because you committed.
Thanks
Comment 10 Slávek Banko 2016-10-13 13:21:52 CDT
(In reply to deloptes from comment #9)
> Hi Slavek,
> yes the tests fail because some datetime altering issue, I could not chase
> to the bottom.
> Does it mean your patch fixes this behavior? I assume yes because you
> committed.
> Thanks

No, patch in attachment 2729 [details] only improves the compilation and execution of tests during build. However, the patch does not fix the problem of failing tests.

Into the GIT was pushed only part of your patch to fix UTF8 handling.
Comment 11 Slávek Banko 2016-10-15 19:45:38 CDT
Patch from attachment 2729 [details] was moved to separate bug 2719.