[ADMIN] Running Windows binaries from non-English folder
[ADMIN] Running Windows binaries from non-English folder
От:
Yuri Martsinovsky <captainsilver@gmail.com>
Дата:
Hi,
I put PostgreSQL binary files in Windows in a folder with Russian name, for example:
C:\Постгрес
When I run pg_ctl.exe from the Command Prompt from this current directory I get the following error:
could not find a "pg_ctl.exe" to execute
pg_ctl.exe file is actually there and it runs, but just prints the above error to the console.
If I run
"C:\Постгрес\pg_ctl.exe"
I get this error:
invalid binary: "C:\????????\pg_ctl.exe"
The same happens when running initdb.exe
Looks like the utility just cannot access its own file because of the russian characters.
The OS is Windows 10
I tried running "chcp 65001" in the console window to set UTF-8 encoding for the console.
Similar errors happen if I put the binaries in English folder, but try to run initdb for a non-english data folder
Does PostgreSQL for Windows support directories in UTF-8 or other encoding?
Re: [ADMIN] Running Windows binaries from non-English folder
От:
George Neuner <gneuner2@comcast.net>
Дата:
On Tue, 07 Nov 2017 19:30:46 +0000, Yuri Martsinovsky wrote: > If I run > "C:\????????\pg_ctl.exe" > I get this error: > invalid binary: "C:\????????\pg_ctl.exe" > > The same happens when running initdb.exe > Looks like the utility just cannot access its own file because of the > russian characters. Try running it using 8.3 path names. Every file and folder in NTFS has 2 names - one "natural" and a secondary "short" DOS 8.3 name+ext format name. You can see short names using DIR /X in a console. The short names should be ASCII (subset) only. E.g., on my system pg_ctl is in C:\program files\postgresql\9.6\bin. It's short name is C:\PROGRA~1\POSTGR~1\9.6\bin\pg_ctl.exe These short names don't permit spaces or non-printing characters, so they can work in situations where the natural name may not. George -- Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin
Re: [ADMIN] Running Windows binaries from non-English folder
От:
Yuri Martsinovsky <captainsilver@gmail.com>
Дата:
Thank you, George!
This should work. You are right, short names are ascii onlyOn Wed, Nov 8, 2017 at 10:10 George Neuner <gneuner2@comcast.net> wrote:On Tue, 07 Nov 2017 19:30:46 +0000, Yuri Martsinovsky
<captainsilver@gmail.com> wrote:
> If I run
> "C:\????????\pg_ctl.exe"
> I get this error:
> invalid binary: "C:\????????\pg_ctl.exe"
>
> The same happens when running initdb.exe
> Looks like the utility just cannot access its own file because of the
> russian characters.
Try running it using 8.3 path names. Every file and folder in NTFS has
2 names - one "natural" and a secondary "short" DOS 8.3 name+ext format
name. You can see short names using DIR /X in a console. The short
names should be ASCII (subset) only.
E.g., on my system pg_ctl is in C:\program files\postgresql\9.6\bin.
It's short name is C:\PROGRA~1\POSTGR~1\9.6\bin\pg_ctl.exe
These short names don't permit spaces or non-printing characters, so
they can work in situations where the natural name may not.
George
--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin