Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8235747
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T18:55:02+00:00 2026-06-07T18:55:02+00:00

I am using UTF8 as encoding for my Postgres 8.4.11 database: CREATE DATABASE test

  • 0

I am using UTF8 as encoding for my Postgres 8.4.11 database:

CREATE DATABASE test
  WITH OWNER = postgres
       ENCODING = 'UTF8'
       TABLESPACE = mydata
       LC_COLLATE = 'de_DE.UTF-8'
       LC_CTYPE = 'de_DE.UTF-8'
       CONNECTION LIMIT = -1;

ALTER DATABASE test SET default_tablespace='mydata';
ALTER DATABASE test SET temp_tablespaces=mydata;

And the output of \l

 test | postgres  | UTF8     | de_DE.UTF-8 | de_DE.UTF-8 |

When I try to insert a German character:

create table x(a text);

insert into x values('ä,ß,ö');
ERROR:  invalid byte sequence for encoding "UTF8": 0xe42cdf
HINT:  This error can also happen if the byte sequence does not match the encoding expected by the server, which is controlled by "client_encoding".

I am using puTTY to connect. Any idea?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T18:55:04+00:00Added an answer on June 7, 2026 at 6:55 pm

    The key element is the client_encoding – the encoding the server expects from your client. It has to match what is actually sent. What do you get for show client_encoding? Is it UNICODE?

    Read more in the chapter Automatic Character Set Conversion Between Server and Client of the manual.

    If you are using psql as client, you can set client_encoding with \encoding. Check the encoding your local system users (on Linux type locale in the shell) and set a matching client_encoding in psql. You can avoid such complications if you use the same locale on your system as you use as encoding for your PostgreSQL server.

    If you use puTTY (on Windows), make sure to set its "Translation" accordingly. Have a look at Settings: Window – Translation. Must match client_encoding. You can right-click in a running session and chose Change Settings. You can also save these settings with your saved sessions.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a 9.0 postgres server instance and a database using UTF8 character encoding
I am trying to create a text file using VB.Net with UTF8 encoding, without
I tried to create databases with different encoding in postgres (I'm using PgAdmin as
When decoding/encoding a utf8 string using json_encode/json_decode I do not get back the string
I am dealing with some unicode strings, which I am encoding using utf-8 whenever
i was using Iconv library on Ruby to convert encoding from UTF-8 to UTF-32,
I have some UTF8 encoding errors using JSON in JAVA: JSONObject json = new
I'm on rails 3.2.1 using postgres with pg 0.13.2 and haml 3.1.4. DB encoding
Using MySQLdb I connect to a database where everything is stored in the utf8
Using utf8 encoding, I know a = \u20ac #=> € I'm wondering is there

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.