There is a really good answer about string comparison at this SO thread:
c++ - How to compare a "basic_string" using an arbitary locale - Stack Overflow[
^].
Regarding your SQL examples, both should return false for the example strings when using
AS
(Accent Sensitive). But I'm not quite sure about the special case
Eszett. The only difference is
CP1
which selects code page 1252 while the other uses a default code page (which might be 1252 too).
I have not used the boost collating and comparing functions so far and can't therefore give a solution using them.
If you are on Windows, you can use the
CompareStringEx function (Windows)[
^].
There is also the
ICU - International Components for Unicode[
^] project providing a library that supports collated comparing (see
Collation - ICU User Guide[
^]).