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

From Tom Lane
Subject Re: BUG #17615: Getting error while inserting records in the table: invalid byte sequence for encoding "UTF8": 0xae
Date
Msg-id 3702540.1663344367@sss.pgh.pa.us
Whole thread Raw
In response to Re: BUG #17615: Getting error while inserting records in the table: invalid byte sequence for encoding "UTF8": 0xae  (Souvik Chatterjee <chatterjeesouvik.besu@gmail.com>)
List pgsql-bugs
Souvik Chatterjee <chatterjeesouvik.besu@gmail.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



pgsql-bugs by date:

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