<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Hi,</p>
<p>try setting the sip api to use version 2 at the beginning of your
program:</p>
<p>import sip<br>
sip.setapi('QDate', 2)<br>
sip.setapi('QDateTime', 2)<br>
sip.setapi('QString', 2)<br>
sip.setapi('QTextStream', 2)<br>
sip.setapi('QTime', 2)<br>
sip.setapi('QUrl', 2)<br>
sip.setapi('QVariant', 2)<br>
</p>
<p>This will make Qt give you unicode strings and get rid of
QVariants in lieu of native python types. Unfortunately the
documentation for this is a bit lacking
(<a class="moz-txt-link-freetext" href="http://pyqt.sourceforge.net/Docs/sip4/python_api.html?highlight=setapi">http://pyqt.sourceforge.net/Docs/sip4/python_api.html?highlight=setapi</a>),
so it is hard to find the api options.</p>
<p>Chris<br>
</p>
<br>
<div class="moz-cite-prefix">On 08/27/2018 06:21 PM, Jones, Bryan
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAHhYbD_xZPfmuc3Bu7C=7vge5tuCNfa7y2VACCxEXanMKn1vcQ@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<div dir="ltr">
<div class="gmail_default"
style="font-family:arial,helvetica,sans-serif;font-size:small">All,</div>
<div class="gmail_default"
style="font-family:arial,helvetica,sans-serif;font-size:small"><br>
</div>
<div class="gmail_default"
style="font-family:arial,helvetica,sans-serif;font-size:small">It
seems that PyQt5 doesn't handle Unicode library paths
correctly. (Of course, this could be an underlying Qt5
problem). Any advice/pointers?</div>
<div class="gmail_default"
style="font-family:arial,helvetica,sans-serif;font-size:small"><br>
</div>
<div class="gmail_default" style="font-size:small">
<div class="gmail_default" style=""><font face="monospace,
monospace">(venv) F:\tmp\中文路径>python</font></div>
<div class="gmail_default" style=""><font face="monospace,
monospace">Python 3.6.1 (v3.6.1:69c0db5, Mar 21 2017,
18:41:36) [MSC v.1900 64 bit (AMD64)] on win32</font></div>
<div class="gmail_default" style=""><font face="monospace,
monospace">Type "help", "copyright", "credits" or
"license" for more information.</font></div>
<div class="gmail_default" style=""><font face="monospace,
monospace">>>> from PyQt5.QtCore import
QLibraryInfo</font></div>
<div class="gmail_default" style=""><span
style="font-family:monospace,monospace">>>>
QLibraryInfo.location(QLibraryInfo.LibrariesPath)</span><br>
</div>
<div class="gmail_default" style=""><font face="monospace,
monospace">'F:/tmp/????/venv/lib/site-packages/PyQt5/Qt/lib'</font></div>
<div class="gmail_default" style=""><font face="monospace,
monospace">>>> import sys</font></div>
<div class="gmail_default" style=""><font face="monospace,
monospace">>>> sys.path</font></div>
<div class="gmail_default" style=""><font face="monospace,
monospace">['',
'F:\\tmp\\中文路径\\venv\\Scripts\\python36.zip',
'F:\\Downloads\\Python36-64\\DLLs',
'F:\\Downloads\\Python36-64\\lib',
'F:\\Downloads\\Python36-64', 'F:\\tmp\\中文路径\\venv',
'F:\\tmp\\中文路径\\venv\\lib\\site-packages']</font></div>
<div class="gmail_default" style=""><font face="monospace,
monospace">>>> from PyQt5.QtCore import
QT_VERSION_STR, PYQT_VERSION_STR</font></div>
<div class="gmail_default" style=""><font face="monospace,
monospace">>>> print(QT_VERSION_STR,
PYQT_VERSION_STR)</font></div>
<div class="gmail_default" style=""><font face="monospace,
monospace">5.11.1 5.11.2</font></div>
</div>
<div class="gmail_default"
style="font-family:arial,helvetica,sans-serif;font-size:small"><br>
</div>
<div class="gmail_default"
style="font-family:arial,helvetica,sans-serif;font-size:small">(Credit
goes to DionSun, reported at <a
href="https://github.com/pyinstaller/pyinstaller/issues/3696"
moz-do-not-send="true">https://github.com/pyinstaller/pyinstaller/issues/3696</a>)</div>
<div>
<div class="gmail_default"
style="font-family:arial,helvetica,sans-serif;font-size:small"><br>
</div>
<div class="gmail_default"
style="font-family:arial,helvetica,sans-serif;font-size:small">Bryan</div>
</div>
-- <br>
<div dir="ltr" class="gmail_signature">
<div dir="ltr">
<div>Bryan A. Jones, Ph.D.<br>
Associate Professor<br>
Department of Electrical and Computer Engineering<br>
231 Simrall / PO Box 9571<br>
Mississippi State University<br>
Mississippi State, MS 39762<br>
<a href="http://www.ece.msstate.edu/%7Ebjones"
target="_blank" moz-do-not-send="true">http://www.ece.msstate.edu/~bjones</a><br>
bjones AT ece DOT msstate DOT edu<br>
voice 662-325-3149<br>
fax 662-325-2298<br>
<br>
Our Master, Jesus Christ, is on his way. He'll show up
right on<br>
time, his arrival guaranteed by the Blessed and Undisputed
Ruler,<br>
High King, High God.<br>
- 1 Tim. 6:14b-15 (The Message)<br>
</div>
</div>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
PyQt mailing list <a class="moz-txt-link-abbreviated" href="mailto:PyQt@riverbankcomputing.com">PyQt@riverbankcomputing.com</a>
<a class="moz-txt-link-freetext" href="https://www.riverbankcomputing.com/mailman/listinfo/pyqt">https://www.riverbankcomputing.com/mailman/listinfo/pyqt</a></pre>
</blockquote>
<br>
</body>
</html>