- During installation, ensure you select a locale other than the default, say English, United States.
- After the installation, execute the following commands from the command line:
initdb -D "C:\Program Files\PostgreSQL\10\data" -U postgres --locale="English_United States.1252"
pg_ctl register -N postgresql-x64-10 -D "C:\Program Files\PostgreSQL\10\data"
net start postgresql-x64-10
Everything should run smoothly onwards. You can check Windows list of Services to verify that postgresql-x64-10 service is up and running
N.B: In case you run into issues with encoding, for example, you may get the error 'ERROR: character with byte sequence 0xd9 0x90 in encoding "UTF8" has no equivalent in encoding "WIN1252"', execute the following SQL query:
update pg_database set encoding = pg_char_to_encoding('UTF8') where datname = '<the-database-name>';