Bug 311091 - non-ascii characters in docstrings not displayed properly
Summary: non-ascii characters in docstrings not displayed properly
Status: RESOLVED FIXED
Alias: None
Product: kdev-python
Classification: Developer tools
Component: Language support (show other bugs)
Version: 1.4.0 / 1.4.1 (stable)
Platform: unspecified Linux
: NOR normal
Target Milestone: 1.4.0
Assignee: Sven Brauch
URL:
Keywords:
: 317882 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-12-03 16:06 UTC by Sven Brauch
Modified: 2013-09-20 11:24 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Incorrect disply docstring with non-ascii characters (37.28 KB, image/png)
2013-09-05 07:07 UTC, Alexandr Zamaraev (aka Tonal)
Details
patch for partial correct problem (8.84 KB, patch)
2013-09-19 06:17 UTC, Alexandr Zamaraev (aka Tonal)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sven Brauch 2012-12-03 16:06:12 UTC
Example code:

# -*- coding: utf-8 -*-

def test():
    """ Описание description """
    None

test()

The non-ASCII string in the docstring is not displayed properly in the tool tip.

Reproducible: Always
Comment 1 Sven Brauch 2013-04-17 00:24:29 UTC
*** Bug 317882 has been marked as a duplicate of this bug. ***
Comment 2 Alexandr Zamaraev (aka Tonal) 2013-09-05 07:07:27 UTC
Created attachment 82172 [details]
Incorrect disply docstring with non-ascii characters
Comment 3 Alexandr Zamaraev (aka Tonal) 2013-09-05 07:08:16 UTC
kdev-python version 1.5.1
Comment 4 Alexandr Zamaraev (aka Tonal) 2013-09-19 06:17:09 UTC
Created attachment 82399 [details]
patch for partial correct problem

I resolve describle problem.
See docstring-coding.diff

But problem reproduce for unicode docstrings
and non utf-8 source encoding.
Comment 5 Sven Brauch 2013-09-19 08:03:31 UTC
Git commit 5efbfef3ca5fb6a10fc43338c708599485c4e5c9 by Sven Brauch.
Committed on 19/09/2013 at 08:02.
Pushed by brauch into branch 'master'.

Fix character encoding in comments.

Patch effectively by  Alexandr Zamaraev <tonal.promsoft@gmail.com> with
some corrections.

M  +5    -5    parser/astbuilder.cpp
M  +5    -5    parser/conversionGenerator.py
M  +13   -13   parser/generated.h

http://commits.kde.org/kdev-python/5efbfef3ca5fb6a10fc43338c708599485c4e5c9
Comment 6 Sven Brauch 2013-09-19 08:05:22 UTC
Great work, thanks for taking this into your own hands -- and sorry for not doing it myself ;)

Your provided patch was indeed the correct solution, I just had to rework it a bit. The problems with non-UTF8 source encodings can also be fixed, since we can force the parser through a flag to always read the text we give it as utf-8, and in kate we'll always have the same encoding anyways.

Thanks again!

Cheers,
Sven
Comment 7 Alexandr Zamaraev (aka Tonal) 2013-09-20 04:38:33 UTC
Сan we hope for bekport to branch 1.5?
Comment 8 Sven Brauch 2013-09-20 11:24:16 UTC
Git commit eec4e51d5ee6cb738386ed824bb19c1c133b1782 by Sven Brauch.
Committed on 19/09/2013 at 08:02.
Pushed by brauch into branch '1.5'.

Fix character encoding in comments.

Patch effectively by  Alexandr Zamaraev <tonal.promsoft@gmail.com> with
some corrections.

M  +5    -5    parser/astbuilder.cpp
M  +5    -5    parser/conversionGenerator.py
M  +13   -13   parser/generated.h

http://commits.kde.org/kdev-python/eec4e51d5ee6cb738386ed824bb19c1c133b1782
Comment 9 Sven Brauch 2013-09-20 11:24:50 UTC
Yeah can do, but I can't promise there'll be another release of 1.5; it's not even terribly likely at this point, since it's not too bad.