Suppose you could store it any way you like, the real meat of it is whether or not you can quickly make use of the way you've stored it with the application querying the database.
@jar said: Suppose you could store it any way you like, the real meat of it is whether or not you can quickly make use of the way you've stored it with the application querying the database.
In other words, normalize everything to either IDN or Punycode. My preference would be to have everything in Punycode, that way a wrong collation on MySQL doesn't end up mangling the data in your database.
Comments
Suppose you could store it any way you like, the real meat of it is whether or not you can quickly make use of the way you've stored it with the application querying the database.
Do not encode idn. Save in raw format (text). This way you will have maximum flexibility to manipulate data.
In other words, normalize everything to either IDN or Punycode. My preference would be to have everything in Punycode, that way a wrong collation on MySQL doesn't end up mangling the data in your database.