Re:Go is still not good
by klodolph on Saturday August 23, 2025 @02:23AM
(#44993716)
IMO the right thing to do here is even messier than Go’s approach, which is give people utf-16-ish strings on Windows.
[ Parent
| on HN ]
Re:Go is still not good
by maxdamantus on Saturday August 23, 2025 @04:07AM
(#44994230)
They have effectively done this (since the linked issue was raised), by just converting Windows filenames to WTF-8.
I think this is sensible, because the fact that Windows still uses UTF-16 (or more precisely "Unicode 16-bit strings") in some places shouldn't need to complicate the API on other platforms that didn't make the UCS-2/UTF-16 mistake.
It's possible that the WTF-8 strings might not concatenate the way they do in UTF-16 or properly enforced WTF-8 (which has special behaviour on concatenation), but they'll still round-trip to the intended 16-bit string, even after concatenation.