We use ogr2ogr to dump data from an old production Oracle server to a development PostgreSQL server. From developer Windows laptop everything works as intended, but from a Windows server the umlauts (or scandinavian letters) transform into non-umlauts.
For example, ä
becomes an a
. Parameters to ogr2ogr include mainly --config PG_USE_COPY YES. The GDAL versions match on both the laptop and the server (3.4.1), as do code pages (850). This happens before we run latin1 to UTF-8 transformations to the generated file or any other transformations.
We have tried suggestions that have worked for many users, for example SET PGCLIENTENCODING=latin1 and other encodings as well. I have also tried setting NLS_LANG but setting that environment variable only causes ogr2ogr to quit with error - this is the only change in the situation we have managed to get.
This is very confusing since it's not a normal encoding problem where umlauts turn into gibberish or vanish altogether. Something seemingly intentionally transforms the umlauts to their plain form and we have no idea what's causing this.