Boost logo

Boost :

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? 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

Boost list run by bdawes at, gregod at, cpdaniel at, john at