4 ms·
> Windows 2000 is when the OS changed to UTF-16 by default. Paths are UTF-16 + unpaired surrogates, so a Windows path isn't legally representable in UTF-8.
by david_allison 5y ago
> Windows 2000 is when the OS changed to UTF-16 by default.
Paths are UTF-16 + unpaired surrogates, so a Windows path isn't legally representable in UTF-8.
- account42 5y agoBut WTF-16 paths can be converted to WTF-8 just fine. You can even use the same algorithm, just only pair surrogates if they are matching an otherwise interpret them as UCS-2 values and encode those normally to "UTF-8".