zlacker

[parent] [thread] 1 comments
1. klodol+(OP)[view] [source] 2025-08-23 06:23:21
IMO the right thing to do here is even messier than Go’s approach, which is give people utf-16-ish strings on Windows.
replies(1): >>maxdam+i8
2. maxdam+i8[view] [source] 2025-08-23 08:07:09
>>klodol+(OP)
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.

[go to top]