14

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" enter image description here

What is the problem exactly thank you

3
  • 2
    It is not a PostgreSQL problem, but a pgAdmin problem. Perhaps there is a database name or a configuration parameter with a value containing "é" and pgAdmin is choking on it. Commented Aug 27, 2017 at 5:12
  • 1
    Seems like you should report a PgADmin bug Commented Aug 27, 2017 at 14:11
  • what is the version of your pgAdmin4 and your windows10 system locale, and also can you provide all the input values you gave in the dialog to re-produce the issue? Commented Aug 31, 2017 at 12:19

6 Answers 6

4

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
Sign up to request clarification or add additional context in comments.

1 Comment

Can you explain what this is supposed to do? Perhaps restarting the server alone is the main solution. Why add an entry to the authentication file?
2

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

Comments

0

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'

Comments

0

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

Comments

0

In my case, this error was due to non-English characters in the path to the date folder

1 Comment

Hi and welcome to Stack Overflow, have you read this post?: stackoverflow.com/help/how-to-answer. Perhaps you can improve your answer by adding more details about your non-English character.
0

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.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.