From: | Juan José Santamaría Flecha <juanjo(dot)santamaria(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Oleksandr Shulgin <oleksandr(dot)shulgin(at)zalando(dot)de>, tutiluren(at)tutanota(dot)com, Pgsql Bugs <pgsql-bugs(at)lists(dot)postgresql(dot)org> |
Subject: | Re: pg_dump seems to be broken in regards to the "--exclude-table-data" option on Windows. |
Date: | 2020-07-29 16:09:17 |
Message-ID: | CAC+AXB0Xsm8kuXKn4tc1R_40fW8rYR_dhb1AFKjeh84JO9jKeA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
On Wed, Jul 29, 2020 at 4:10 PM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Oleksandr Shulgin <oleksandr(dot)shulgin(at)zalando(dot)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:
C:\test>chcp 65001
Active code page: 65001
C:\test>test_argv Hëllö
Hëllö
0x48C3AB6C6CC3B6
Hll
0x48EB6C6CF6
C:\test>chcp 1252
Active code page: 1252
C:\test>test_argv Hëllö
Hëllö
0x48C3AB6C6CC3B6
Hëllö
0x48EB6C6CF6
To match this behaviour PGCLIENTENCODING should match the Windows system
ANSI encoding.
Regards,
Juan José Santamaría Flecha
Attachment | Content-Type | Size |
---|---|---|
test_argv.c | text/plain | 480 bytes |
From | Date | Subject | |
---|---|---|---|
Next Message | PG Bug reporting form | 2020-07-29 17:47:18 | BUG #16560: Strange behavior with polygon and NaN |
Previous Message | Fujii Masao | 2020-07-29 14:24:33 | Re: pg_stat_statements: rows not updated for CREATE TABLE AS SELECT statements |