3 ms·
Yes that does seem to be the way going forward. Makes it a lot easier to write cross-platform code. Though library code still has to use the Wide Character APIs
by ziml77 2y ago
Yes that does seem to be the way going forward. Makes it a lot easier to write cross-platform code. Though library code still has to use the Wide Character APIs because it's up to the application as a whole to opt into UTF-8. Also if you're looking for maximal efficiency, the WChar APIs still make sense because it avoids the conversion of all the string inputs and outputs on every call.
- terinjokes 2y agoMany libraries I've encountered have defines available now to use the -A APIs; previously they were using -W APIs and converting to/from UTF-8 internally. As for my application, any wchar conversions being done by the runtime are a drop in the bucket compared to the actual compute.
- account42 2y ago> Also if you're looking for maximal efficiency, the WChar APIs still make sense because it avoids the conversion of all the string inputs and outputs on every call. OTOH you need ~twice as much memory / copy ~twice as much data around than if you converted to WTF-8 internally.