International Domain Names support in Mentat
Currently, Mentat does not support International Domain Names at all. There are several places where this can lead to problems. The obvious case is the e-mail addresses for reporting, but those are in addition used as identifiers internally in the database layer.
The topic of IDN support in an application is quite complex, warranting it's own RFC , but libraries with helpers do exist to ease the task (and using a library is the only recommended and scalable approach). A special consideration must be taken as there are two consecutive incompatible standards, the deprecated IDNA2003 and the current IDNA2008.
pip packaged library named
python-idna exists , is marked stable and has been successfully used in other CESNET projects recently.
In IDNA2008, two distinct representations of international domain names coexist: a Unicode version for presentation and an ASCII version for transport and storage. As we generally can handle Unicode internally (both Python and PostgreSQL do support it), we are not limited in this way, the only requirements being:
- the ability to discern IDNs regardless of Unicode encoding idiosyncrasies (multiple different binary representations of equivalent strings),
- correct presentation of data to the user (the A-label syntax is not really human-readable).
The IDNA library/ies are designed to provide exactly this functionality.