Years ago I dumped the text of emails directly into the database into a text column
message | text | YES | | NULL
I pulled it out and displayed it on the website with a simple select like
select message from postings where id = 553671
using DBI and DBD
Much of the email now ends up like binary junk like this one:
http://www.mrbrklyn.com/docs/file.txt
I've tried decoding it with pearl with no success. Obvously it is textwidth set someout and has \ inserted in the output.
Is there a fix to this?
В Thu, 23 Nov 2023 12:18:10 -0500 Ruben Safir via discuss discuss@lists.mariadb.org пишет:
message | text | YES | | NULL
I pulled it out and displayed it on the website with a simple select like
select message from postings where id = 553671
using DBI and DBD
Much of the email now ends up like binary junk like this one:
I don't think that there's anything in MariaDB that would silently escape tabs and newlines in a TEXT column. On the other hand, Perl's built-in escaping via \Q...\E would have also escaped every space and many other kinds of characters.
If you're sure this is what you're getting from the database (e.g. you can see it in the SQL dump, in the Perl debugger when inspecting the return value of $sth->fetchrow, or if you hexdump it using unpack "H*", $str and see things like 5c09 or 5c0a), the way back seems to unescape these things manually, using something like s/\([\t\n])/$1/gs.
participants (2)
-
Ivan Krylov
-
Ruben Safir