Re: [Mimedefang] utf-8 issue?
On 14 Dec 2017, at 9:14 (-0500), Dianne Skoll wrote: On Wed, 13 Dec 2017 20:37:36 -0500 "Bill Cole"wrote: -return IO::File->new(\ $self->{MBS_Data}, $mode); +return IO::Scalar->new(\ $self->{MBS_Data}, $mode); This will cause other problems down the line. I suggest you study the section "Byte and Character Semantics" in the perlunicode man page. Thanks for the reference and for your patience with my confusion. I understand much better now: anything expressed as a string has to make sense as a series of encoded characters, not a series of bytes. And as `strings PerlIO/scalar/scalar.bundle` says: "Strings with code points over 0xFF may not be mapped into in-memory file handles" Modern Perl does let you open a "file" by passing a reference to a scalar; it has built-in in-memory I/O. Indeed. I was fooled by the fact that deep inside the 'open' call stack, both $! and $^E get set to "No such file or directory" but that's because XSLoader looks for a .bs while loading PerlIO::scalar... I couldn't find exactly where the "Invalid Argument" error (and matching numeric errno) is being generated, since it's in a debug-resistant return that pops 4 stack layers in one step, but I'm perfectly happy to believe that it's buried in PerlIO/scalar/scalar.bundle and is entirely proper. -- Bill Cole b...@scconsult.com or billc...@apache.org (AKA @grumpybozo and many *@billmail.scconsult.com addresses) Currently Seeking Steady Work: https://linkedin.com/in/billcole ___ NOTE: If there is a disclaimer or other legal boilerplate in the above message, it is NULL AND VOID. You may ignore it. Visit http://www.mimedefang.org and http://www.roaringpenguin.com MIMEDefang mailing list MIMEDefang@lists.roaringpenguin.com http://lists.roaringpenguin.com/mailman/listinfo/mimedefang
Re: [Mimedefang] Is calling action_rebuild() idempotent?
On Thu, 14 Dec 2017 08:52:32 -0800 Amit Guptawrote: > If I call action_rebuild() a couple times in my filter_end code, could > it have different effects depending on when it's called? Nope. All it does is set a flag informing mimedefang.pl it should rebuild the message when filter_end is done. Regards, Dianne. ___ NOTE: If there is a disclaimer or other legal boilerplate in the above message, it is NULL AND VOID. You may ignore it. Visit http://www.mimedefang.org and http://www.roaringpenguin.com MIMEDefang mailing list MIMEDefang@lists.roaringpenguin.com http://lists.roaringpenguin.com/mailman/listinfo/mimedefang
[Mimedefang] Is calling action_rebuild() idempotent?
If I call action_rebuild() a couple times in my filter_end code, could it have different effects depending on when it's called? ___ NOTE: If there is a disclaimer or other legal boilerplate in the above message, it is NULL AND VOID. You may ignore it. Visit http://www.mimedefang.org and http://www.roaringpenguin.com MIMEDefang mailing list MIMEDefang@lists.roaringpenguin.com http://lists.roaringpenguin.com/mailman/listinfo/mimedefang
Re: [Mimedefang] utf-8 issue?
On Wed, 13 Dec 2017 20:37:36 -0500 "Bill Cole"wrote: > -return IO::File->new(\ $self->{MBS_Data}, $mode); > +return IO::Scalar->new(\ $self->{MBS_Data}, $mode); This will cause other problems down the line. I suggest you study the section "Byte and Character Semantics" in the perlunicode man page. Modern Perl does let you open a "file" by passing a reference to a scalar; it has built-in in-memory I/O. Regards, Dianne. ___ NOTE: If there is a disclaimer or other legal boilerplate in the above message, it is NULL AND VOID. You may ignore it. Visit http://www.mimedefang.org and http://www.roaringpenguin.com MIMEDefang mailing list MIMEDefang@lists.roaringpenguin.com http://lists.roaringpenguin.com/mailman/listinfo/mimedefang
Re: [Mimedefang] utf-8 issue?
On Wed, 13 Dec 2017 21:03:27 -0500 "Bill Cole"wrote: > It is entirely possible (as stated explicitly in RFC2045) for a MIME > entity to contain unencoded binary data: any arbitrary stream of > bytes. Stream of *bytes* yes. But Perl native characters > 0xFF are not bytes. Regards, Dianne. ___ NOTE: If there is a disclaimer or other legal boilerplate in the above message, it is NULL AND VOID. You may ignore it. Visit http://www.mimedefang.org and http://www.roaringpenguin.com MIMEDefang mailing list MIMEDefang@lists.roaringpenguin.com http://lists.roaringpenguin.com/mailman/listinfo/mimedefang