IT.COM

question How to deal with spaces in punycode for IDNs?

Spaceship Spaceship
Watch

TerriJ

Established Member
Impact
274
When turning foreign phrase(2+ words) into punycode, you'll also encounter a space within the punycode.

For example:
с днем рождения ("Happy Birthday" in Russian) == xn-- -klcbdcfs5aigizh7t

You can't have xn-- -klcbdcfs5aigizh7t.com

As far as I can tell when doing domain searches on a registrar, you can't ever have a space (or spaces) inside the domain name. But within the punycode, if you close the gap, it doesn't translate back to the actual word. It spits out "invalid punycode."

Should I simply close the gap in the words like this: сднемрождения ....
and then translate this into punycode? I get: xn--d1aacbdoygfgvh7q
As you can see the punycode comes out completely different and has no space.
But xn--d1aacbdoygfgvh7q.com would translate into сднемрождения.com ..which is OK, right?

Note: "Happy birthday" is simply an example to illustrate my point.
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
There cannot be spaces in punycode or unicode string as per IDNA2008, the standard that regulates how to go from one to the other.

Use this tool to convert your unicode strings into punycode, it is up to date and will rightly show you an error if the string is not formatted correctly as per the IDNA2008 standard: http://mct.verisign-grs.com/
 
0
•••
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back