
On 12 August 2011 10:30, Yakov Galka <ybungalobill@gmail.com> wrote:
On Fri, Aug 12, 2011 at 10:58, Daniel James <dnljms@gmail.com> wrote:
Not really, boost is intended to be interoperable with the C++ standard library. That limits us to following its conventions and policies.
The standard library doesn't have any conventions.
My mistake, I should have said the de facto conventions.
Oops, you're right. My claim was based on http://www.boost.org/doc/libs/1_47_0/doc/html/program_options/design.html, which happens to be a LIE.
I doubt it's a lie. Sometimes we change our mind and forget to update the rationale. Or maybe it uses the locale when converting from narrow to wide, but uses UTF-8 when dealing with narrow strings. Anyway, this is getting increasingly off topic.
We are talking here not just about std::string but about any 'sequences of chars'. sqlite accepts UTF-8 filenames on *windows*! I'm not sure about what requirements are you talking. boost is a library after all, just as sqlite is.
A part of the popularity of boost is because it works well with existing code. So we need to work with the strings we get at the command line, from streams etc.
Unless a different solution can be found.
Exactly.
I meant a different solution to assuming that std::string is always UTF-8. It appears unlikely that your proposal will be accepted by boost, so what other possibilities are there? Perhaps a distinct string type, maybe some mechanism to specify what encoding strings are using, or something else entirely?