Locale & stability
Sorting uses localeCompare with numeric collation off. Line breaks from Windows (\r\n) and Unix (\n) are handled; result always uses \n between lines.
Order every line A → Z or Z → A using locale-aware comparison.
Sorting uses localeCompare with numeric collation off. Line breaks from Windows (\r\n) and Unix (\n) are handled; result always uses \n between lines.