Bug 356993 - Title Clips, containing non-ASCII, not displayed after reloading project
Summary: Title Clips, containing non-ASCII, not displayed after reloading project
Status: RESOLVED NOT A BUG
Alias: None
Product: kdenlive
Classification: Applications
Component: Rendering & Export (show other bugs)
Version: unspecified
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: Jean-Baptiste Mardelle
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-12-21 11:53 UTC by opensuse.lietuviu.kalba
Modified: 2016-10-06 16:56 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
test.kdenlive (19.25 KB, application/x-kdenlive)
2015-12-21 12:06 UTC, opensuse.lietuviu.kalba
Details
testing.tar.gz – scripts for rendering (1.84 KB, application/gzip)
2015-12-21 14:29 UTC, opensuse.lietuviu.kalba
Details

Note You need to log in before you can comment on or make changes to this bug.
Description opensuse.lietuviu.kalba 2015-12-21 11:53:34 UTC
I use Kdenlive 0.9.10 4.14.9 from http://packman.links2linux.de in openSUSE 13.2 
After creating project with Title Clips, I saved it and re-opened. After reloading, some Title Clips are not displayed in Project Monitor or after Rendering; it only shows content in Clip Monitor. After editing Title Clips (e.g. changing alignement, X, Y values), It starts to show in Project Monitor, but still not after Rendering to video file.

Reproducible: Sometimes
Comment 1 opensuse.lietuviu.kalba 2015-12-21 12:06:04 UTC
Created attachment 96226 [details]
test.kdenlive

This test has 5 Title Clips. Third Title Clip not displayed.
Comment 2 opensuse.lietuviu.kalba 2015-12-21 12:25:33 UTC
It seems, that Kdenlive fails to display Title Clips containing non-ASCII characters.
Comment 3 opensuse.lietuviu.kalba 2015-12-21 12:53:50 UTC
I just found it reported in another place:
https://bugs.kdenlive.org/view.php?id=3441
Comment 4 opensuse.lietuviu.kalba 2015-12-21 13:12:02 UTC
I just tested Kdenlive 15.12.0 – problem is the same!
Comment 5 opensuse.lietuviu.kalba 2015-12-21 14:29:48 UTC
Created attachment 96229 [details]
testing.tar.gz – scripts for rendering

002 – created with š letter in third slide.
003 – š replaced with s letter in third slide.

> diff test_002.sh.mlt test_003.sh.mlt
80c80
<   <property name="xmldata">&lt;kdenlivetitle width="1365" duration="125" height="768" LC_NUMERIC="C">
---
>   <property name="xmldata">&lt;kdenlivetitle width="1365" duration="125" height="768" out="125" LC_NUMERIC="C">
86c86,95
< i</property>
---
> iskart su 
> kasdienio
> naudojimo
> programomis&lt;/content>
>  &lt;/item>
>  &lt;startviewport rect="0,0,1365,768"/>
>  &lt;endviewport rect="0,0,1365,768"/>
>  &lt;background color="0,0,0,0"/>
> &lt;/kdenlivetitle>
> </property>
Comment 6 Jean-Baptiste Mardelle 2015-12-21 15:04:47 UTC
Can you please tell me what is your locale setting ?
Just type:
locale 
in a terminal and paste the result here
Comment 7 opensuse.lietuviu.kalba 2015-12-21 15:06:01 UTC
> locale 
LANG=lt_LT.UTF-8
LC_CTYPE="lt_LT.UTF-8"
LC_NUMERIC="lt_LT.UTF-8"
LC_TIME="lt_LT.UTF-8"
LC_COLLATE="lt_LT.UTF-8"
LC_MONETARY="lt_LT.UTF-8"
LC_MESSAGES="lt_LT.UTF-8"
LC_PAPER="lt_LT.UTF-8"
LC_NAME="lt_LT.UTF-8"
LC_ADDRESS="lt_LT.UTF-8"
LC_TELEPHONE="lt_LT.UTF-8"
LC_MEASUREMENT="lt_LT.UTF-8"
LC_IDENTIFICATION="lt_LT.UTF-8"
LC_ALL=
Comment 8 Jean-Baptiste Mardelle 2015-12-21 15:16:30 UTC
The attached test.kdenlive project was created with Kdenlive 0.9.10 and for some reason it has a "C" locale setting when it should be "lt_LT.UTF-8".. that might be the reason. 

If you start a new project in Kdenlive 15.12.0, and create a new title clip with whatever character you want, can you still reproduce the bug ? If you can, please attach this Kdenlive 15.12 project file here
Comment 9 opensuse.lietuviu.kalba 2015-12-21 15:46:32 UTC
I tested Kdenlive 15.12 in another system.
If I create new project, I can not reproduce bug.
And if I open kdenlive project as text file, I see
 LC_NUMERIC="lt_LT.UTF-8"
Comment 10 opensuse.lietuviu.kalba 2015-12-21 15:49:08 UTC
But in first system, i I manually change C to lt_LT.UTF-8, and try open in Kdenlive, I get warning:
There is a locale conflict on your system. The document uses locale lt_LT.UTF-8 which uses a "," as numeric separator (in system libraries) but Qt expects ".". You might not be able to correctly open the project.
Comment 11 opensuse.lietuviu.kalba 2015-12-21 16:20:53 UTC
Hm... Workaround for my first system with Kdenlive 0.9.10 is to start program with variable:

LC_ALL="lt_LT.UTF-8" kdenlive

Then after editing slides, saving them, I can revert document and text will be displayed in Project Monior, even if LC_NUMERIC="C"
Comment 12 opensuse.lietuviu.kalba 2015-12-21 16:22:06 UTC
P.S. In second system with latest Kdenlive
`locale` returns LC_ALL="lt_LT.UTF-8" in one row
Comment 13 opensuse.lietuviu.kalba 2015-12-22 14:08:30 UTC
As Kdenlive proposes to insert any unicode character in dialog, please ensure fine creation of Title Clips with unicode independent of user locale!
Comment 14 opensuse.lietuviu.kalba 2016-02-17 10:08:18 UTC
Kdenlive must not use locale, while writing configuration files.
Using locale causes problems:  see https://bugs.kde.org/show_bug.cgi?id=359016 case – they solved by switching to QString::number
Comment 15 Jean-Baptiste Mardelle 2016-02-17 11:24:46 UTC
The problem is that Kdenlive project files are not just configuration files.
When playing a Kdenlive project file, the xml is directly sent to MLT and passed to the various libraries involved in the process, and these libraries are locale aware.

So unfortunately, we cannot simply ignore the user locale.
Comment 16 opensuse.lietuviu.kalba 2016-02-17 11:30:29 UTC
I don't know about these libraries, but then they must be handled in way, that don't disturb Kdenlive. Even if user use multi-lingual interface, i.e. often switch between locales.

Hint: maybe you could provide patches to enhance libraries...
Comment 17 opensuse.lietuviu.kalba 2016-02-17 11:36:50 UTC
Can you please explain comments 7 and 9?

I.e. why LC_ALL is sensitive? Why not only  LC_NUMERIC is sensitive?
Comment 18 opensuse.lietuviu.kalba 2016-08-04 17:16:07 UTC
It is important feature! Please use some workarounds!
Comment 19 Wegwerf 2016-08-04 17:18:01 UTC
Do you understand the implications that Jean-Baptiste, the current main developer, pointed out to you?
Comment 20 opensuse.lietuviu.kalba 2016-08-04 17:33:19 UTC
Jean-Baptiste just said, that locale can not be ignored. He did not closed bug.
Comment 21 opensuse.lietuviu.kalba 2016-08-04 17:42:01 UTC
I suggest, Kdenlive could check,
1) if $LC_ALL is empty (as in comment 7), try temporally assign same value as $LC_NUMERIC
2) but never use LC_ALL=C, use LC_ALL=en_US.UTF-8 to keep unicode!

But maybe exist better workarounds
Comment 22 Wegwerf 2016-08-04 17:47:23 UTC
The issue is, for example MLT, which is not only the engine inside Kdenlive and other editors, but also the part doing most, if not almost all of the XML serialization and deserialization. So this is at this time an upstream issue which you can discuss with the MLT project.
Comment 23 farid 2016-10-06 16:56:25 UTC
Hi,

As suggested by Wegwerf this is an MLT upstream issue so please report this in MLT's trackers at: https://github.com/mltframework/shotcut 

Regards