Problem
I found this issue when trying to run the unit tests for seleniumlibrary on my Windows machine.
Translation files containing non-ASCII characters (e.g. Finnish ä, ö) are read incorrectly on Windows. The _translation() function in utils/translations.py opens the file without specifying an encoding, so Python falls back to the system locale encoding (cp1252 on Windows). This silently corrupts keyword names and documentation containing multi-byte UTF-8 characters.
For example, a translated keyword name hallinnoi_hälytys is stored as hallinnoi_hälytys in keywords_spec, making it impossible to look up by its correct name.
This does not affect CI pipelines running on Linux, where the default encoding is already UTF-8, which explains why the bug only reproduces locally on Windows.
Problem
I found this issue when trying to run the unit tests for seleniumlibrary on my Windows machine.
Translation files containing non-ASCII characters (e.g. Finnish ä, ö) are read incorrectly on Windows. The _translation() function in utils/translations.py opens the file without specifying an encoding, so Python falls back to the system locale encoding (cp1252 on Windows). This silently corrupts keyword names and documentation containing multi-byte UTF-8 characters.
For example, a translated keyword name hallinnoi_hälytys is stored as hallinnoi_hälytys in keywords_spec, making it impossible to look up by its correct name.
This does not affect CI pipelines running on Linux, where the default encoding is already UTF-8, which explains why the bug only reproduces locally on Windows.