boost::iequals is not utf-8 compatible in the case of string.
You can use boost::locale.
comparator cmpr;
cout << (cmpr(str1, str2) ? "str1 < str2" : "str1 >= str2") << endl;
- Primary -- ignore accents and character case, comparing base letters only. For example "facade" and "Façade" are the same.
- Secondary -- ignore character case but consider accents. "facade" and "façade" are different but "Façade" and "façade" are the same.
- Tertiary -- consider both case and accents: "Façade" and "façade" are different. Ignore punctuation.
- Quaternary -- consider all case, accents, and punctuation. The words must be identical in terms of Unicode representation.
- Identical -- as quaternary, but compare code points as well.