Hello all.
I used to install MIME-tools 5.411a via the CPAN shell on MacOS X 10.2.8
(and 10.1.5) without any problems.
Trying to do the same on MacOS X 10.3.4 ends with an error while doing 'make
test'. The error can be seen in Ref.tlog:
---------------
1..50
[...]
Trying ./testmsgs/russian.ref [./testmsgs/russian.msg]
Default charset: KOI8-R** PARSE LOG FOR ./testmsgs/russian.ref
[./testmsgs/russian.msg]
** debug: process_header
** debug: type = text, subtype = plain
** debug: process_singlepart...
** debug: taking shortcut
** debug: extract uuencode? <<undef>>
** debug: encoding? 7bit
** debug: effective type? text/plain
** debug: is this evil? 'Û²¦À.doc'
** debug: it's ok
** debug: planning to use 'Û²¦À.doc'
** debug: outputting body to disk file: testout/Ref_t/Û²¦À.doc
41: ./testmsgs/russian.ref
41: Problem: "write-open testout/Ref_t/\F3\D0\C9\D3\CF\CB.doc: \
Invalid argument at \
/Users/pascal/Desktop/MIME-tools-5.411/blib/lib/MIME/Body.pm \
line 414, <GEN80> line 4.\n"
41: not ok 41
42: Did purge work?
42: Purgeable: "testout/Ref_t/\F3\D0\C9\D3\CF\CB.doc"
42: ok 42
[...]
---------------
It seems something goes wrong while decoding the binary encoded Russian
filename. I just can't see what it is...
Has anyone seen this before? What can I do/try/test?
BTW: same results for the 6.011 dev version.
Thanks a lot in advance!
Pascal
> I used to install MIME-tools 5.411a via the CPAN shell on MacOS X
> 10.2.8
[quoted text clipped - 3 lines]
> 'make
> test'. The error can be seen in Ref.tlog:
It looks like MIME::Tools is tripping over Perl 5.8's UTF8 support.
Looking through MIME::Tools, it appears that it manually encodes UTF8
strings by inserting the necessary escapes into ordinary ASCII strings.
This worked (and was necessary) with earlier Perls, because they didn't
know about UTF8 - ASCII bytes were passed as-is to system calls that
are UTF8-aware, and those system calls figured out the UTF8 encoding.
Beginning with 5.8, Perl understands the difference between ASCII and
UTF8. When passing an ASCII string to a system function it knows is
UTF8-aware, it encodes the contents of the string as UTF8. UTF8 escape
sequences found in the ASCII string aren't interpreted as such -
they're escaped again, so that the result is a UTF8 representation of
the text in the string, complete with backslashes and hex numbers.
One fix would be to use 5.8's utf8::upgrade() function. That sets
Perl's UTF8 flag for ASCII strings that have been manually encoded, so
that it interprets the bytes in them as UTF8. A better fix might be to
use 5.8's utf8::encode() function instead of manually encoding strings
to begin with.
sherm--
Pascal Oberndoerfer - 15 Jul 2004 16:58 GMT
Sherm Pendley at sherm@dot-app.org:
>> I used to install MIME-tools 5.411a via the CPAN shell on MacOS X
>> 10.2.8
[quoted text clipped - 26 lines]
>
> sherm--
Scanning through the results at
<http://testers.cpan.org/show/MIME-tools.html#MIME-tools-5.411a> this seems
to be related to 5.8.1 (RC1?). It does work with 5.8.0 (as supplied with
10.2.8). And the error doesn't seem to occur with 5.8.4 e.g. on Linux.
Thanks again for the clarification!
Pascal
Sherm Pendley - 15 Jul 2004 17:22 GMT
> Scanning through the results at
> <http://testers.cpan.org/show/MIME-tools.html#MIME-tools-5.411a> this
> seems
> to be related to 5.8.1 (RC1?). It does work with 5.8.0 (as supplied
> with
> 10.2.8). And the error doesn't seem to occur with 5.8.4 e.g. on Linux.
Jaguar 10.2.8 ships with 5.6.0.
I get the same error with 5.8.4 on Panther - it might have something to
do with Perl's interaction with HFS+. Perhaps there's a compile-time
option I could use when building Perl that would avoid the problem.
sherm--