In my tests I use locators with German letters, for example, .//button[@aria-label='Löschen'].
These tests successfully passed in Visual Studio, but failed while executed in Jenkins with such an exception
OpenQA.Selenium.NoSuchElementException: no such element: Unable to locate element: {"method":"xpath","selector":".//button[@aria-label='L”schen']"}
In folder where repo is downloaded all there letters are correct.
So looks like either during build (use MSBuild .NET 4 option in Jenkins job) or during execution (use Jenkins Batch command C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\IDE\Extensions\TestPlatform\vstest.console.exe) German-specific letters are lost and cannot be recognized.
May be there is kind of plugin or so one for Jenkins to fix this?
Searched for 'German' in available Jenkins plugins, but results are empty. 'Locale' plugin seems to be only for interface language change.
Try using Unicode instead of plaintext Umlauts in your code, that's how I solved this particular issue in my Selenium Smoketests running inside Jenkins (with Junit5 on a Java 17 codebase)
So in your example it'd be