Oleksandr Shulgin <oleksandr.shulgin@zalando.de> writes: > Didn't you mention that once you could overcome the runtime errors you > still have seen some unexpected output from pg_dump? A script that one can > download and run on their (Windows) system would help to confirm the > problem (if it does reproduce on others' systems) and speed up diagnosys > and a fix, if required.
My understanding of what's happening here (admittedly, I've not been paying really close attention) is that some component is misprocessing non-ASCII data as it's being typed into the pg_dump shell command. That being the case, I'm not sure that a pre-written shell script could reproduce the issue accurately. A script to create the initial database contents would surely be helpful, but the steps after that might need to be more like "type this into the terminal, and then you will get X instead of Y".
On a Windows "char* argv[]" uses the system default Windows ANSI code page (CP_ACP), this can only be changed through the system Regional settings. The "chcp" command changes the code page of the printed characters on CMD.
Please find attached a simple test program: "test_argv.c". The output for this program is: