Re:WorstFit: Unveiling Hidden Transformers in Windows ANSI
by ziml77 on Thursday January 09, 2025 @01:43PM
(#42648601)
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.
[ Parent
| on HN ]
Re:WorstFit: Unveiling Hidden Transformers in Windows ANSI
by terinjokes on Thursday January 09, 2025 @04:07PM
(#42649799)
Many 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.
Re:WorstFit: Unveiling Hidden Transformers in Windows ANSI
by account42 on Wednesday January 15, 2025 @07:46AM
(#42710270)
> 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.