Quantcast
Viewing all articles
Browse latest Browse all 5970

make diff ignore case of umlauts

I need to make diff ignore the case of my inputs. Both inputs contain German umlauts like ä and Ä. Option -i successfully makes diff ignore the case of my input for other characters like a and A, but not for umlauts:

$ diff -i <(echo ä) <(echo Ä)1c1< ä---> Ä

The output should be empty, as ä and Ä should be seen as the same letter if case is ignored. If I try this instead:

$ diff -i <(echo a) <(echo A)

Then it works as expected (no output).

I also tried to set the environment variable LANG to make diff use the correct locale, but this didn’t seem to have any influence:

LANG=de_DE.UTF-8 diff -i <(echo ä) <(echo Ä)

I tried various values for LANG.

Is there a way to make diff ignore the case of German umlauts?

(I’m on Ubuntu 22.04 FWIW.)


Viewing all articles
Browse latest Browse all 5970

Trending Articles