Hacker News new | ask | show | jobs
by ormax3 994 days ago
The above manifesto makes the argument to use UTF-8 *everywhere*, even on windows where the internal representation is not native utf8.

The conversion overhead is really negligible: https://utf8everywhere.org/#faq.cvt.perf

(note: the two api calls per conversion is because how those specific functions work, first call to get the size to allocate, second to do the actual conversion, but you can always use another library in the implementation for the utf8<->utf16 conversion that might be more optimized than those windows api functions)

1 comments

Especially negligible versus the trip to the file system you are setting up for.
Not all API calls are for filesystem access.
Sure, but basically everything having to do with file paths on Windows, the topic here, relates to the file system.