pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: TomGoodman@mhproez.com <tomgoodman@mhproez.com>
To: pgsql-odbc@lists.postgresql.org
Subject: Re: Fwd: Invalid byte sequence
Date: Wed, 7 Oct 2026 21:46:44 -0400
Message-ID: <b7abdcf3-b347-4930-b6bb-d1796048095e@mhproez.com> (raw)
In-Reply-To: <CA+FnnTwsULryZT2TcAq1Vsz4ZbmN5gQQ+Kqn2uQ8FUEx0j8ReA@mail.gmail.com>
References: <CA+FnnTzCm8NABjtSnCgqsqgK8-7Uj_w4f3XQ8E457=AqBcxprA@mail.gmail.com>
	<CA+FnnTwsULryZT2TcAq1Vsz4ZbmN5gQQ+Kqn2uQ8FUEx0j8ReA@mail.gmail.com>

Igor,

Well, the Postgres message is correct. That sequence is not valid UTF8. 
Your choices seem to be to fix and clean the data so it is valid UTF8 or 
change the encoding to a less validated set.

Some sources:

https://stackoverflow.com/questions/4867272/invalid-byte-sequence-for-encoding-utf8

https://stackoverflow.com/questions/32239350/invalid-byte-sequence-for-encoding-utf8-0xed-0xa0-0xbd

https://stackoverflow.com/questions/6555015/check-for-invalid-utf8/6555104#6555104


Tom Goodman, email TomGoodman@MHProEZ.com
1406 Tenth St., Bay City, MI 48708, USA, Phone +1 989 482 0489
* God grant me the serenity to accept the code I cannot change
* the courage to change the code I can change
* and the wisdom to know the difference

On 2026-10-07 21:33, Igor Korot wrote:
> Does anyone have an idea of what is happening?
>
> Thank you.
>
>
> ---------- Forwarded message ---------
> From: *Igor Korot* <ikorot01@gmail.com>
> Date: Tue, Oct 6, 2026 at 12:23 AM
> Subject: Invalid byte sequence
> To: PostgreSQL ODBC list <pgsql-odbc@postgresql.org>
>
>
> Hi, ALL,
>
> When  run my program and connect to the Postgres server with ODBC
> INTERMITTENTLY receive the error:
>
> ERROR: invalid byte sequence for encoding "UTF8" 0xed 0xbf 0xa0
> Does this sound familiar to anyone?
>
> Thank you.
>
> Trying to google I only got meaningful sugesston for when the last 
> byte s 0
>
> I code n C++.

view thread (5+ messages)  latest in thread

Message-ID: <b7abdcf3-b347-4930-b6bb-d1796048095e@mhproez.com>
Permalink:  ../b7abdcf3-b347-4930-b6bb-d1796048095e@mhproez.com/
Also on:    postgresql.org/message-id/b7abdcf3-b347-4930-b6bb-d1796048095e@mhproez.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-odbc@postgresql.org
  Cc: tomgoodman@mhproez.com
  Subject: Re: Fwd: Invalid byte sequence
  In-Reply-To: <b7abdcf3-b347-4930-b6bb-d1796048095e@mhproez.com>
  References: <CA+FnnTzCm8NABjtSnCgqsqgK8-7Uj_w4f3XQ8E457=AqBcxprA@mail.gmail.com> <CA+FnnTwsULryZT2TcAq1Vsz4ZbmN5gQQ+Kqn2uQ8FUEx0j8ReA@mail.gmail.com> <b7abdcf3-b347-4930-b6bb-d1796048095e@mhproez.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox