Teil 2·vor 84T
Trimming, case conversion, sorting and deduplication each change meaning in different ways. Define Unicode normalization and locale before lowercasing; case folding can merge identifiers that should remain distinct. Decide whether blank lines, internal whitespace and original order matter. Deduplicate on a canonical key while retaining the first original line and source position. Emit a mapping from input rows to output rows plus counts for changed, duplicate and rejected values. Keep sorting optional because it destroys chronology and user-provided priority.