3 ms·
Punycode (the way Unicode maps to DNS names) is pretty clever. Characters for a given language are close together, so Punycode optimizes for encoding characters
by Scaevolus 10y ago
Punycode (the way Unicode maps to DNS names) is pretty clever. Characters for a given language are close together, so Punycode optimizes for encoding characters close together. https://en.wikipedia.org/wiki/Punycode https://en.wikipedia.org/wiki/Punycode
Here's an example from the RFC: https://tools.ietf.org/html/rfc3492#section-7.1 https://tools.ietf.org/html/rfc3492#section-7.1
Unicode: 他们为什么不说中文
DNS: xn--ihqwcrb4cv8a8dqg056pqjye
utf8 base64: 5LuW5Lus5Li65LuA5LmI5LiN6K+05Lit5paH
Let's see if HN will link these:
http://.ws http://.ws -> http://xn--ls8h.ws/ http://xn--ls8h.ws/
edit: Nope, it strips (!) emoji from comments.
- deleted 10y ago[deleted]
- jackweirdy 10y ago️