pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Invalid byte sequence
5+ messages / 3 participants
[nested] [flat]

* Invalid byte sequence
@ 2026-10-06 07:23 Igor Korot <ikorot01@gmail.com>
  2026-10-06 07:40 ` Re: Invalid byte sequence M. Neumann - Prisma Computer <m.neumann@prisma-computer.de>
  2026-10-08 01:33 ` Fwd: Invalid byte sequence Igor Korot <ikorot01@gmail.com>
  0 siblings, 2 replies; 5+ messages in thread

From: Igor Korot @ 2026-10-06 07:23 UTC (permalink / raw)
  To: pgsql-odbc

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++.





^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: Invalid byte sequence
  2026-10-06 07:23 Invalid byte sequence Igor Korot <ikorot01@gmail.com>
@ 2026-10-06 07:40 ` M. Neumann - Prisma Computer <m.neumann@prisma-computer.de>
  1 sibling, 0 replies; 5+ messages in thread

From: M. Neumann - Prisma Computer @ 2026-10-06 07:40 UTC (permalink / raw)
  To: pgsql-odbc@lists.postgresql.org

Hi,

could it be that the database uses an encoding other than UTF-8 (e.g. 
SQL_ASCII or LATIN1)? If so, another client may at some point have 
written data that cannot be represented in UTF-8. Since your connection 
uses UTF-8 as the client encoding, those raw bytes can't be converted, 
which would explain why the error only shows up intermittently, i.e. 
only when the affected rows are involved.

Am 06.10.2026 um 09:23 schrieb Igor Korot:
> 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++.








^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Fwd: Invalid byte sequence
  2026-10-06 07:23 Invalid byte sequence Igor Korot <ikorot01@gmail.com>
@ 2026-10-08 01:33 ` Igor Korot <ikorot01@gmail.com>
  2026-10-08 01:46   ` Re: Fwd: Invalid byte sequence TomGoodman@mhproez.com <tomgoodman@mhproez.com>
  2026-10-08 06:13   ` Re: Fwd: Invalid byte sequence M. Neumann - Prisma Computer <m.neumann@prisma-computer.de>
  1 sibling, 2 replies; 5+ messages in thread

From: Igor Korot @ 2026-10-08 01:33 UTC (permalink / raw)
  To: pgsql-odbc

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++.

^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: Fwd: Invalid byte sequence
  2026-10-06 07:23 Invalid byte sequence Igor Korot <ikorot01@gmail.com>
  2026-10-08 01:33 ` Fwd: Invalid byte sequence Igor Korot <ikorot01@gmail.com>
@ 2026-10-08 01:46   ` TomGoodman@mhproez.com <tomgoodman@mhproez.com>
  1 sibling, 0 replies; 5+ messages in thread

From: TomGoodman@mhproez.com @ 2026-10-08 01:46 UTC (permalink / raw)
  To: pgsql-odbc@lists.postgresql.org

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++.

^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: Fwd: Invalid byte sequence
  2026-10-06 07:23 Invalid byte sequence Igor Korot <ikorot01@gmail.com>
  2026-10-08 01:33 ` Fwd: Invalid byte sequence Igor Korot <ikorot01@gmail.com>
@ 2026-10-08 06:13   ` M. Neumann - Prisma Computer <m.neumann@prisma-computer.de>
  1 sibling, 0 replies; 5+ messages in thread

From: M. Neumann - Prisma Computer @ 2026-10-08 06:13 UTC (permalink / raw)
  To: Igor Korot <ikorot01@gmail.com>; pgsql-odbc

Hi,

could it be that the database uses an encoding other than UTF-8 (e.g. 
SQL_ASCII or LATIN1)? If so, another client may at some point have 
written data that cannot be represented in UTF-8. Since your connection 
uses UTF-8 as the client encoding, those raw bytes can't be converted, 
which would explain why the error only shows up intermittently, i.e. 
only when the affected rows are involved.


Am 08.10.2026 um 03:33 schrieb Igor Korot:
> 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++.

-- 
Prisma Computer GmbH
Sternallee 89  -  68723 Schwetzingen
Fon 0 62 02.5 75 68 10
Fax 0 62 02.5 75 68 75
eMail:m.neumann@prisma-computer.de
Internet:www.prisma-computer.de

Geschäftsführung: Gerald Wilkens, Martin Goebel
Amtsgericht Mannheim HRB 420986 S
USt-IdNr.: DE 144 278 153

^ permalink  raw  reply  [nested|flat] 5+ messages in thread


end of thread, other threads:[~2026-10-08 06:13 UTC | newest]

Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2026-10-06 07:23 Invalid byte sequence Igor Korot <ikorot01@gmail.com>
2026-10-06 07:40 ` M. Neumann - Prisma Computer <m.neumann@prisma-computer.de>
2026-10-08 01:33 ` Igor Korot <ikorot01@gmail.com>
2026-10-08 01:46   ` TomGoodman@mhproez.com <tomgoodman@mhproez.com>
2026-10-08 06:13   ` M. Neumann - Prisma Computer <m.neumann@prisma-computer.de>

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