Re:Golang's network stack attempts to parse HTTP headers as ...
by arpa on Thursday January 21, 2021 @12:15PM
(#25861297)
The real wtf here is a separate K for Kelvin, a separate N for Newton, etc. Why on gods' greenish earth do we need something that looks like a duck, quacks like a duck, but actually is not a duck but an eldritch horror?
[ Parent
| on HN ]
Re:Golang's network stack attempts to parse HTTP headers as ...
by azornathogron on Thursday January 21, 2021 @04:55PM
(#25864940)
One of the design criteria for Unicode was to guarantee lossless round-trip conversion through Unicode for a bunch of encodings that Unicode superceded. If one of those encodings contained both a K and a K-for-Kelvin, then Unicode also had to allocate two codepoints for it. I don't know if that's the case for these characters in particular, but it is one possible explanation.
Supporting round-trip conversion may sound pointless now that Unicode is ubiquitous, but it was probably necessary to make gradual adoption practical.
Ref: https://en.m.wikipedia.org/wiki/Unicode_compatibility_charac...
Re:Golang's network stack attempts to parse HTTP headers as ...
by arpa on Friday January 22, 2021 @02:18AM
(#25869286)
That could explain it, but it doesn't make it any less crazy. I'm tempted to use K-for-Kelvin in my code now, just to fuck with anyone who works with a worse IDE or tries finding things with grep.