Postgresql installation failed if we provide non-english password(Chinese or French)

installationpostgresqlpostgresql-9.6

I am using Postgresql postgresql-9.6.2-2-windows-x64.exe installation on a French Windows OS.

I specified Télécharger as the password during postgres installation on the French OS.

(Note: I got the same error when I used Chinese characters.)

Locale used: C

I have tried even french locale but the result was same.

Please help.

Installation Logs:

[12:09:33] Write the base directory to the ini file...
[12:09:33] Write the version number to the ini file...
Initialisation du cluster de bases de données (cela peut prendre un certain temps)...
Executing cscript //NoLogo "C:\Program Files\PostgreSQL\9.6/installer/server/initcluster.vbs" "NT AUTHORITY\NetworkService" "postgres" "****" "C:\Program Files\PostgreSQL\9.6" "C:\Program Files\PostgreSQL\9.6\data" 5432 "C" 0
Script exit code: 1

Script output:
 WScript.Shell Initialized...
Scripting.FileSystemObject initialized...

Called CreateDirectory(C:\Program Files\PostgreSQL\9.6\data)...
Called CreateDirectory(C:\Program Files\PostgreSQL\9.6)...
WScript.Network initialized...
strParentOfDataDirC:\Program Files\PostgreSQL\9.6
logged in userFrench-win7\Admin
Called AclCheck(C:\Program Files\PostgreSQL\9.6\data)
Called IsVistaOrNewer()...
    'winmgmts' object initialized...
    Version:6.1
    MajorVersion:6
Executing icacls to ensure the French-win7\Admin account can read the path C:\Program Files\PostgreSQL\9.6\data
    Executing batch file 'radABEF2.bat'...
    fichier trait'˜: C:\Program Files\PostgreSQL\9.6\data
1 fichiers correctement trait's˜; 'chec du traitement de 0 fichiers

Called IsVistaOrNewer()...
    'winmgmts' object initialized...
    Version:6.1
    MajorVersion:6
Ensuring we can write to the data directory (using icacls) to  French-win7\Admin:
    Executing batch file 'radABEF2.bat'...
    fichier trait'˜: C:\Program Files\PostgreSQL\9.6\data
1 fichiers correctement trait's˜; 'chec du traitement de 0 fichiers

    Executing batch file 'radABEF2.bat'...
    Les fichiers de ce cluster appartiendront … l'utilisateur ® Admin ¯.
Le processus serveur doit ‚galement lui appartenir.

L'instance sera initialis‚e avec la locale ® C ¯.
La configuration de la recherche plein texte a ‚t‚ initialis‚e … ® english ¯.

Les sommes de contr“les des pages de donn‚es sont d‚sactiv‚es.

correction des droits sur le r‚pertoire existant C:/Program Files/PostgreSQL/9.6/data... ok
cr‚ation des sous-r‚pertoires... ok
s‚lection de la valeur par d‚faut de max_connections... 100
s‚lection de la valeur par d‚faut pour shared_buffers... 128MB
s‚lection de l'impl‚mentation de la m‚moire partag‚e dynamique...windows
cr‚ation des fichiers de configuration... ok
lancement du script bootstrap...ok
ex‚cution de l'initialisation aprŠs bootstrap...FATAL:  invalid byte sequence for encoding "UTF8": 0xe9 0x6c 0xe9
le processus fils a quitt‚ avec le code de sortie 1
initdb : suppression du contenu du r‚pertoire des donn‚es ® C:/Program Files/PostgreSQL/9.6/data ¯

Called Die(Failed to initialise the database cluster with initdb)...
Failed to initialise the database cluster with initdb

Script stderr:
 Program ended with an error exit code

Erreur dans l'exécution de cscript //NoLogo "C:\Program Files\PostgreSQL\9.6/installer/server/initcluster.vbs" "NT AUTHORITY\NetworkService" "postgres" "****" "C:\Program Files\PostgreSQL\9.6" "C:\Program Files\PostgreSQL\9.6\data" 5432 "C" 0 : Program ended with an error exit code
Un problème est survenu lors de l'exécution de l'étape de post-installation. L'installation peut avoir échoué
 L'initialisation du cluster de bases de données a échoué.
Création du Désinstalleur
Création du désinstalleur 25%
Création du désinstalleur 50%
Création du désinstalleur 75%
Création du désinstalleur 100%
Installation terminée
Log finished 09/12/2017 at 12:14:05

Best Answer

I'm not a Postgresql guy, but from this blog by Jasper Peilee:

If you need Asian-language support, don’t leave(sp) the locale as “default”. Simply choose any other locales, e.g. “C” in the combo list.

After the installation, supposing you need simplified Chinese support, change the configuration using command:

Windows: initdb -D data –locale=chinese-simplified_china.936 -E UTF-8 Unix/Linux: –locale=zh_CN.UTF-8

Hopefully that points you in the proper direction. If not, please update your question with some more information such as the error you receive, the installer you're using, the installer options, etc.