Reputation: 451
I recently installed PostgreSql and I am trying to create a new database. Unfortunetly I got and error while creating the database:
"'utf8' codec can't decode byte 0xe9 in position 42: invalid continuation byte"
What is the problem exactly thank you
Upvotes: 14
Views: 25418
Reputation: 1
The solution is very simple: find the postgresql.conf file on the server.
In Windows, it is located here: C:/Program Files/PostgreSQL/16/data/postgresql.conf
.
Find the line with the lc_messages
parameter.
Replace the lines with:
lc_messages = 'English_United States.1252'
lc_monetary = 'English_United States.1252'
lc_numeric = 'English_United States.1252'
lc_time = 'English_United States.1252'
default_text_search_config = 'pg_catalog.english'
P.S: If the file is not in this location, then use the SHOW config_file;
request on the server. This will show the path to the file.
Upvotes: 0
Reputation: 1
In my case, this error was due to non-English characters in the path to the date folder
Upvotes: 0
Reputation: 75
I tried all the solutions above. None worked.
The solution for me was to install US ENGLISH as my language on my windows 10. Then I did the installation all over again in that language.
It's working now, and I do not have use US ENGLISH as my windows language xD
Upvotes: 0
Reputation: 173
I had a similar error when upgrading from 4.5 to 4.7, the solution was to restart the pgAdmin server.
My error was: Error: 'utf-8' codec can't decode byte 0xe9 in position 0: invalid continuation byte
Upvotes: 2
Reputation: 431
It's a conflict between local languages. PgAdmin is in English but maybe in the conf file the lc_messages variable is French, Spanish or something else. Try this
lc_messages = 'en_US'
Upvotes: 0
Reputation: 49
Try to add the following line at the end of the pg_hba.conf file and then restart the PostgreSQL service:
host all all all md5
Upvotes: 4