<div dir="ltr">Hi Luca,<div><br></div><div style>I already looked :-). Anyway, the SIP code uses this call:</div><div style><br></div><div style><div>          arg = (QString *)sipForceConvertToType(pyarg, sipType_QString, NULL, SIP_NOT_NONE, &state, &iserr);</div>
<div><br></div></div><div style>But having reviewed the docs at <a href="http://pyqt.sourceforge.net/Docs/sip4/c_api.html">http://pyqt.sourceforge.net/Docs/sip4/c_api.html</a>, and the implementation of <span style="color:rgb(0,0,0);font-size:12px">sip_api_force_convert_to_type() in </span><a href="http://www.riverbankcomputing.co.uk/hg/sip/file/fc54ee3b5308/siplib/siplib.c">http://www.riverbankcomputing.co.uk/hg/sip/file/fc54ee3b5308/siplib/siplib.c</a>, all I can tell is that this code has not been changed since 2008. So, I guess the problem lies deep in the innards of the SIP library where Python strings are handled.<br>
</div><div style><br></div><div style>If my guess is right, then I'm not sure how siplib.c works because I would thought it would need the same kind of version-dependent hackery I had to add to the Pate plugin (in utlities.cpp)  to handle all the variations in Python's C API, but all I see is some tests for HAVE_WCHAR_T. AFAIK, that's not enough, but I expect I have simply not guessed correctly.</div>
<div style><br></div><div style>Thanks, Shaheed</div><div style><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On 6 May 2013 08:19, Luca Beltrame <span dir="ltr"><<a href="mailto:lbeltrame@kde.org" target="_blank">lbeltrame@kde.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">In data domenica 5 maggio 2013 16:46:36, Philipp A. ha scritto:<br>
<div class="im">> i wrote an analysis of the behavior here. It seems that the bug surfaces in<br>
> both python 2 and python 3.<br>
<br>
</div>Shaheed, the i18n() calls use custom Python code. Can you take a look at<br>
kdecore/klocalizedstring.sip in PyKDE4 and see if the code there (only the<br>
Python C API bits) looks off? I'm not familiar with the Python API enough to<br>
make a guess.<br>
<div class="HOEnZb"><div class="h5"><br>
--<br>
Luca Beltrame - KDE Forums team<br>
KDE Science supporter<br>
GPG key ID: 6E1A4E79</div></div></blockquote></div><br></div>