[Kdenlive-devel] text encoding issues in mlt / kdenlive

Carsten Pfeiffer gisl at leonde.de
Thu Dec 28 19:57:23 UTC 2006


Hi,

as I found out today, the crash I recently experienced isn't actually related 
to the content of the avi-clip, but only to the filename "ägypten-048.avi".

I'm wondering if there is a policy regarding text encoding in mlt. kdenlive 
tries to encode all filenames that are passed to mlt according to the local 
filesystem encoding, which appears to work fine.

If the filenames are embedded into XML documents (e.g. westley format), then 
this is not easily possible. Whatever XML-encoding you use, libxml2 will 
return UTF-8 to you. This is a problem for example in the westley module: the 
filenames read from the XML document are not converted to the local 
filesystem encoding, thus mlt fails to open those files.

This is something that needs to be addressed in mlt -- there needs to be some 
place where UTF-8 to local encoding, similar to QFile::encodeName(), happens. 
One possible place would be everywhere, where UTF-8 input arrives, e.g. from 
libxml2. Another option would be to expect all input, all filenames in UTF-8.


kdenlive then needs to adapt to this policy. Also, all XML-snippets need to be 
passed to mlt as UTF-8 instead of the filesystem encoding. E.g. krender.cpp 
currently uses decodedString() to convert westley-snippets to the local 
filesystem encoding, in my case ISO-8859-1, which libxml2 later tries to read 
as UTF-8, leading to the crash I experienced.

The pango module probably also expects UTF-8.

Cheers,
Carsten




More information about the Kdenlive mailing list