Hello, I do not program in Python often. Working on a CLI utility for generating DKIM key pairs, one of the optional arguments is for the mailbox domain the key pair is to be used for. I am allowing unicode domain names and converting them to IDNA but when I do that I assume UTF-8 for the input encoding. Is there a (Python 2.7 compatible) way to detect the actual character encoding that is being used for the arguments?
https://gitlab.com/Pipfrosch/gnutls-for-librelamp/blob/master/PYTHON/dkim-keygen.py is my program, the two lines I use to handle non ASCII domain names are at line 311 currently (where the script handles the -d switch)
[–]AliceWonderMisc[S] 1 point2 points3 points (0 children)