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? -- So many immigrant groups have swept through our town that Brooklyn, like Atlantis, reaches mythological proportions in the mind of the world - RI Safir 1998 http://www.mrbrklyn.com DRM is THEFT - We are the STAKEHOLDERS - RI Safir 2002 http://www.nylxs.com - Leadership Development in Free Software http://www2.mrbrklyn.com/resources - Unpublished Archive http://www.coinhangout.com - coins! http://www.brooklyn-living.com Being so tracked is for FARM ANIMALS and extermination camps, but incompatible with living as a free human being. -RI Safir 2013
В 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. -- Best regards, Ivan
participants (2)
-
Ivan Krylov
-
Ruben Safir