in reply to Re^2: Character encoding in emails
in thread Character encoding in emails

So, then your questions to answer are:
  1. What was the encoding of the data you received from ChatGPT?
  2. Did you store it in a unicode-aware database column type and with unicode enabled on the DBI connection?
  3. Did you read it back out with unicode enabled on the DBI connection?
  4. What was the encoding of the strings containing your HTML?
  5. What encoding did your MIME construction code expect?

and my standard suggestion is to make sure you decoded bytes into unicode from the moment it enters your program until the time it exits your program (or in this case, until the time that you construct the MIME, because MIME should always be 7-bit ascii)