Re: BUG #17615: Getting error while inserting records in the table: invalid byte sequence for encoding "UTF8": 0xae

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Souvik Chatterjee <chatterjeesouvik(dot)besu(at)gmail(dot)com>
Cc: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #17615: Getting error while inserting records in the table: invalid byte sequence for encoding "UTF8": 0xae
Date: 2022-09-16 16:06:07
Message-ID: 3702540.1663344367@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Souvik Chatterjee <chatterjeesouvik(dot)besu(at)gmail(dot)com> writes:
> So you meant to say registered trademark: ®
> is not a valid UTF-8 character?

I'm sure that there is such a Unicode character, but the way you
are presenting it to the database is not UTF-8. It's some other
character encoding, probably a single-byte encoding such as a
member of the ISO 8859 family [1]. I see in the table there
that code 0xAE is the trademark symbol in 8859-1 (LATIN1) and
some but not all of the other variants. You need to arrange
for the proper encoding conversion to happen. Perhaps reading [2]
would help.

regards, tom lane

[1] https://en.wikipedia.org/wiki/ISO/IEC_8859
[2] https://www.postgresql.org/docs/current/multibyte.html

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2022-09-16 17:28:02 Re: BUG #17610: Use of multiple composite types incompatible with record-typed function parameter
Previous Message Souvik Chatterjee 2022-09-16 15:48:52 Re: BUG #17615: Getting error while inserting records in the table: invalid byte sequence for encoding "UTF8": 0xae