[prev in list] [next in list] [prev in thread] [next in thread]
List: pykde
Subject: Re: sip 6: handling of UTF-8 in Docstrings
From: Scott Talbert <swt () techie ! net>
Date: 2021-08-05 0:20:46
Message-ID: alpine.DEB.2.22.394.2108042020060.406109 () bear ! techie ! net
[Download RAW message or body]
On Wed, 4 Aug 2021, Phil Thompson wrote:
>> I encountered a strange problem after building wxPython with sip 6.
>> When importing wxPython, I got this UnicodeDecodeError:
>>
>> rawhide$ python -c "import wx;print(wx.version())"
>> Traceback (most recent call last):
>> File "<string>", line 1, in <module>
>> File "/usr/lib64/python3.10/site-packages/wx/__init__.py", line 17,
>> in <module>
>> from wx.core import *
>> File "/usr/lib64/python3.10/site-packages/wx/core.py", line 12, in
>> <module>
>> from ._core import *
>> UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc3 in position
>> 261: invalid continuation byte
>> free(): invalid size
>> Aborted (core dumped)
>>
>> Upon investigating further, it seems that the root cause is that there
>> is a UTF-8 character in one of wxPython's docstrings and sip 6.1.1
>> doesn't seem to handle this correctly, whereas sip 5.5.0 does.
>> Attached is the .sip file as well as the .cpp files generated by both
>> sip 5 and sip 6 so you can see the difference:
>>
>> 3398c3183
>> < "the wxListCtrl it can be thought of as a façade for that complicated\n"
>> ---
>>> "the wxListCtrl it can be thought of as a fa\xffffffc3\xffffffa7ade for
>> that complicated\n"
>
> Should be fixed in the next snapshot. Patch attached.
Thanks for the quick fix!
Scott
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic