Bug 183182 - Code completion/navigator displays incorrectly non English UTF-8 characters (in comments)
Summary: Code completion/navigator displays incorrectly non English UTF-8 characters (...
Status: RESOLVED FIXED
Alias: None
Product: kdevelop
Classification: Applications
Component: Language Support: CPP (old) (show other bugs)
Version: unspecified
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: kdevelop-bugs-null
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-02-04 15:01 UTC by Maciej Mrozowski
Modified: 2009-07-22 18:45 UTC (History)
1 user (show)

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


Attachments
one picture worth thousands of words :) (36.37 KB, image/png)
2009-02-04 15:02 UTC, Maciej Mrozowski
Details
test scenario (file with Polish characters in comments encoded as UTF-8 character set) (467 bytes, text/x-c++src)
2009-02-04 15:03 UTC, Maciej Mrozowski
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Maciej Mrozowski 2009-02-04 15:01:06 UTC
Version:           r921027 (trunk) (using KDE 4.2.0)
Compiler:          gcc (Gentoo 4.3.3 p1.0, pie-10.1.5) 4.3.3 build in Debug
OS:                Linux
Installed from:    Gentoo Packages

Comments, when appended to some C/C++ language elements (like classes, methods, variables, functions) and containing some language specific characters (like Polish "ogonki" like ąęśćłóżź etc) in well (encoding-wise) formatted file - are not displayed correctly in code completion box as well as in code navigator/browser (either as tooltip or tool view).
Looks like cpplanguagesupport (and probably languagesupport in kdevplatform) doesn't detect document encoding properly.
Comment 1 Maciej Mrozowski 2009-02-04 15:02:19 UTC
Created attachment 30954 [details]
one picture worth thousands of words :)
Comment 2 Maciej Mrozowski 2009-02-04 15:03:36 UTC
Created attachment 30955 [details]
test scenario (file with Polish characters in comments encoded as UTF-8 character set)
Comment 3 Victor Grischenko 2009-07-03 16:24:25 UTC
I've got this issue on PHP-files and russian language too.
Comment 4 David Nolden 2009-07-08 09:17:43 UTC
SVN commit 992973 by zwabel:

Use QString::fromUtf8, instead of implicit conversion.
CCBUG: 183182


 M  +1 -1      abstractdeclarationnavigationcontext.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=992973
Comment 5 Victor Grischenko 2009-07-08 15:28:56 UTC
> SVN commit 992973 by zwabel:
>
> Use QString::fromUtf8, instead of implicit conversion.
> CCBUG: 183182

It works for popup but not for Code Browser
Comment 6 Milian Wolff 2009-07-20 15:33:00 UTC
That was fixed some time ago - looks like those "BUG: ####" doesn't work for me in the commit messages :-/
Comment 7 Maciej Mrozowski 2009-07-21 20:38:11 UTC
If you try with for example attached test case, you'll see that issue is not fixed yet, so please reopen (unless you want to shuffle the problem under the carpet).
Comment 8 Maciej Mrozowski 2009-07-21 20:41:22 UTC
as of r1000239, let me be more specific.
It doesn't work neither with popup no code browser (of course characters are well formatted UTF8 as seen in screenshot - at least displayed properly) - it's really trivial to reproduce anyway
Comment 9 Andreas Pakulat 2009-07-22 12:32:51 UTC
Milian, please re-test the issue before closing reports. This is not fixed yet, the comments are still double-encoded (i.e. reading the utf-8 as latin1 from the file and then later encoding the latin1-bytearray as utf-8).
Comment 10 Andreas Pakulat 2009-07-22 12:34:31 UTC
Oh and Maciej, I suggest to leave out comments such as "(unless you want to shuffle the problem under the carpet)". It doesn't help you in any way to get the problem fixed as all this does is insult the developers.
Comment 11 Milian Wolff 2009-07-22 15:02:45 UTC
I'm sorry - seems like I only checked PHP files and apparrently it works fine there :-/

I had another look and found the culprit. I committed a fix. Before I close it again - can you all check it please ;-)
Comment 12 Andreas Pakulat 2009-07-22 15:36:17 UTC
Thanks, its fixed now.
Comment 13 Maciej Mrozowski 2009-07-22 18:45:33 UTC
Confirmed, it's fixed now.

I apologise for that plug, it wasn't necessary indeed.