Messed-up encoding in doc-comments (in the popup-widget)

David Nolden david.nolden.kdevelop at art-master.de
Tue Jul 7 21:58:53 UTC 2009


Am Dienstag 07 Juli 2009 14:53:59 schrieb Milian Wolff:
> Hey guys, I want to fix bug https://bugs.kde.org/show_bug.cgi?id=183182
> but am a bit lost. Can someone give me a bit of insight?
>
> What I found out is that it only affects doc-comments and that it is not
> due to formatComment().
>
> 1) How could I properly debug this stuff? kDebug() doesn't seem to work
> fine. Could I use GDB and somehow print me the text and see where it
> gets corrupted?
>
> 2) Could the popup-widget be the culprit? Where are its sources again?
Generally, the comments are supposed to be utf8 encoded within the duchan. And 
kDebug() should work properly with them. If it doesn't, then that's probably 
already part of the problem.

There is one thing that comes into my mind. Look at 
kdevelop/languages/cpp/preprocessjob.cpp: I think there's somewhere a @todo, 
saying something like "convert the file to utf-8 if it isn't yet", and I think 
that todo is there still.

That would need a check like "If the local encoding is not utf-8, convert the 
text before processing it".

This might be another part of the problem. Although my locale is utf-8, and I 
still can reproduce the problem, so this probably isn't the main reason.

Greetings, David





More information about the KDevelop-devel mailing list