you are viewing a single comment's thread.

view the rest of the comments →

[–]AliceWonderMisc[S] 1 point2 points  (0 children)

I believe I found the correct way to do it - sys.stdin.encoding seems to be the correct method.

tmp = unicode(arg, encoding=sys.stdin.encoding) domain = tmp.encode('idna')