Reputation: 25
I have a powershell script where I need to replace the following characters:
Ä = Ae, ä = ae, Ö = Oe, ö = oe, Ü = Ue, ü = ue
But if i run my script Powershell doesn't differentiate between uppercase letters and the lowercase letters.
Does anyone know how to solve this problem?
Upvotes: 1
Views: 480
Reputation: 58991
In PowerShell, you can perform a case-sensitive comparison by using -ceq
instead of -eq
:
'Ö' -eq 'ö'
True
'Ö' -ceq 'ö'
False
See also: PowerTip: Use PowerShell to Perform Case-Sensitive Comparison
Upvotes: 2