How to get PyQt to work with Russian domains?

0 like 0 dislike
5 views
Faced with a problem when working with the QUrl in Python. In General terms, have such test code:

from PyQt4.QtCore import QUrl

print QUrl('http://xn--d1abbgf6aiiy.xn--p1ai/').toString()



Under windows it returns the expected result:
xn--d1abbgf6aiiy.xn--p1ai/



And under FreeBSD like this:
xn--d1abbgf6aiiy.xn--d1abbgf6aiiyxn--p1ai/



PyQt here www.riverbankcomputing.co.uk/software/pyqt/download version 4.8.1
by | 5 views

2 Answers

0 like 0 dislike
I do not know what is the problem with PyQt, but it can circumvent the forced conversion of the url in the IDNA
//to encode the domain.RF xn--d1acufc.xn--p1ai
domain = domain_rf.encode('idna')
//decode xn--d1acufc.xn--p1ai in domain.Russia
domain = domain_rf.decode('idna')
by
0 like 0 dislike
If this is the case, then this degradation PyQt, and the Qt is possible. Suggest to turn it over to a direct mailing list or the bugtracker first, PyQt, and then, if you say that the problem is Qt, on the Qt bugtracker.
by

Related questions

0 like 0 dislike
2 answers
0 like 0 dislike
2 answers
asked Apr 5, 2019 by DumpyCoder
0 like 0 dislike
2 answers
asked Apr 1, 2019 by DumpyCoder
0 like 0 dislike
7 answers
110,608 questions
257,186 answers
0 comments
28,667 users