Subject: Re: [boost] Silly Boost.Locale default narrow string encoding in Windows
From: Artyom Beilis (artyomtnk_at_[hidden])
Date: 2011-10-27 13:06:45


> > then it fails to work when the literal string is replaced > with a `main` argument. > > A conversion is then necessary and must be added. > > It breaks the principle of least surprise. > > It breaks the principle of not paying for what you don't > (want to) use. > Did you read this? http://beta.boost.org/doc/libs/1_48_0_beta1/libs/locale/doc/html/default_encoding_under_windows.html You can **easily** switch to ANSI as default... But you don't want to (rather switch to UTF-16 or UTF-8) especially when you actually use localization... :-) > I understand, from discussions elsewhere, that the > author(s) have chosen a narrow string encoding that requires > inefficient & awkward conversions in all directions, for > political/religious reasons. No you hadn't read rationale correctly and didn't read what is written in the link I had given. If you write "Windows only" software you should either set Ansi option to use native encoding - UTF-16. If not stick to cross platform UTF-8. > Maybe my understanding of that > is faulty, that it's no longer politics & religion but > outright war (and maybe that war is even over, with even > Luke Skywalker dead or deadly wounded). However, I still > ask: > > why FORCE INEFFICIENCY & AWKWARDNESS on Boost > users  --  why not just do it right, using the > platforms' native encodings. > Windows native encoding is not ANSI. It is Wide/UTF-16 encoding. ----------------------------------------------------- If you still not convinced, using UTF-8 by default was one of important pluses this library brings and it was noticed by many reviewers. Artyom