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

Popular posts from this blog

iphone - Dismissing a UIAlertView -

intellij idea - Update external libraries with intelij and java -

javascript - send data from a new window to previous window in php -