Does anyone know where the reasoning behind the strange collating behavior in the en_US.UTF-8 locale? No matter how I pre-sort the IP list, en_US.UTF-8 collating still wants to put the "128.*" IP address between two "12.*" ones.
It's because in the english language punctuation is not relevant to alphabetic sorting. The sorting ignores the '.' characters, so that the result is the same as a sort in the "C" locale if you removed the '.'s from the strings.