c++ - Does STL sort support UTF8? -
c++ - Does STL sort support UTF8? -
does stl sort function back upwards alphabetical sorting of names have utf-8 characters in them? names german/french language?
that exclusively depends on how store utf-8 characters , how comparer looks like. sort
function agnostic of elements sorts.
but mean “… when stored in char
array” , reply no since char
s store individual bytes of given utf-8 character, instead of logical character. sort
function sorts elements delimited iterators. sort
works if iterators / elements refer aware of info contain. isn’t case array of char
s encode utf-8.
the “correct” solution here parse utf-8 input array of proper (normalised) unicode code points, sort those, , translate utf-8.
c++ sorting stl utf-8
Comments
Post a Comment