We are upgrading our systems for IDNA support but I'm currently struggling with our domain search. In our domain portfolio you can search for domains. IDNA domains are saved as their A-label in our database (café-modern.com
is saved as xn--caf-modern-d7a.com
) and we just convert it to the U-label when displaying it in the browser.
Problem is that this totally breaks our search.
When someone searches for café-modern.com
I can easily convert it to the IDNA value and use that in the WHERE domain_name LIKE ?
part of the DB-query but when someone searches just for café
(xn--caf-dma
) that should also find café-modern.com
A solution would be to save both the A-label and U-label values in the database but that's somehing I would want to keep as a last resort because the dataset is quite large and I would like to keep the database schema as simple as possible.