Many countries already solved this problem with their ccTLDs decades ago. It only required taking the established practices and applying them to a new class of names. There are always some edge cases, but domain name assignment is pretty much a solved problem.