I'm running a DB2 v10.5 FP 7 on a Windows Server 2013 and there is a problem with the encoding setup:
The windows is set to use German(Switzerland) as region setting and input language.
chcp: Active code page: 850
My database is set to UTF-8, see this output from db2 get cfg
Datenbankgebiet = CH Codepage für Datenbank = 1208 Codierter Zeichensatz der Datenbank = UTF-8 Landescode der Datenbank = 41 Sortierfolge der Datenbank = SYSTEM_1252 Alternative Sortierfolge (ALT_COLLATE) =
The correct value would be '87100 - Überbauung Hinterroos'. Notice how also the default db2 output is shown as 'Sõtze' instead of 'Sätze'.
The incorrect output can also be reproduced by selecting the same rows via JDBC/Java.
IBM Documentation says this behaviour is linked to the DB2CODEPAGE registry variable, which is not set explicitly on the server.
Any ideas how to fix this?
EDIT: (More info as requested by @mao):
The windows default code page is 850 too. In the registry, codepages are as follows:
- ACP 1252
- OEMCP 850
- MACCP 10000
To make sure I'm not following any wrong leads, I verified the stored string in the table by
SELECT HEX(DISPLAY_NAME)... which outputs
The letter with umlaut is 0xC39C which is CAPITAL LETTER U WITH DIARESIS