Bring back IDN support

Fixes #1213