3 ms·
I was unpleasantly surprised by how much locales are used for seemingly trivial things. It's even the case with the C++ iostreams stuff. I ended up writing my
by secondcoming 4y ago
I was unpleasantly surprised by how much locales are used for seemingly trivial things. It's even the case with the C++ iostreams stuff.
I ended up writing my own functions in an 'ascii' namespace to avoid all this as much as possible.
This [0] rant about locales and how they're nigh-on impossible to use correctly is quite amusing (slightly NSFW)
[0] https://github.com/mpv-player/mpv/commit/1e70e82baa9193f6f027338b0fab0f5078971fbe https://github.com/mpv-player/mpv/commit/1e70e82baa9193f6f02...
- secondcoming 4y agoAs a follow up, if anyone uses `boost::lexical_cast` a lot, try defining BOOST_LEXICAL_CAST_ASSUME_C_LOCALE for some performance speed-ups and code size reductions
- Aanok 4y agoI understand that wm4 was probably a pretty difficult person to work with, but he got stuff done well and from the safe distance of my chair he was a rather entertaining fellow. The other mpv devs can't miss him but I kinda do.