Click to See Complete Forum and Search --> : netscape 6.0+ can't read files with certain names
dsanger
07-04-2003, 06:42 PM
Netscape 6.2 and 7.0 seem to choke on the characters ".z." in a fle name
The image
davidsanger.com/images/bay/1-70-43.bookcover.z.jpg (http://davidsanger.com/images/bay/1-70-43.bookcover.z.jpg)
doesn’t display in netscape 6.2 and 7.0 (MAC) but works fine in 4.7.7 and IE
But this one is fine
davidsanger.com/images/bay/1-70-43.bookcover.zz.jpg (http://davidsanger.com/images/bay/1-70-43.bookcover.zz.jpg)
[Same image]
Now look at this page
davidsanger.com/pages/p.z.html (http://davidsanger.com/pages/p.z.html)
in netscape and explorer. Netscape doesn’t even have the sourcecode.
What the heck is going on?
david
jeffmott
07-04-2003, 07:24 PM
.Z is an extension for a UNIX Compressed Archive File. It's possible Netscape is mistakingly attempting to interpret and uncompress a file with this in its name.
...Just a guess.
Khalid Ali
07-04-2003, 07:51 PM
I am sure if you dropped the .zz and make it like
1-70-43.bookcoverzz.jpg
or uderscore it will work...
word oc caution:
Always try to avoid using confusing names of files in any programming language they could cause some un-traceable errors..:-)
dsanger
07-04-2003, 09:10 PM
the unix reply makes sense but i can't see this as a documented feature of netscape. ie reads it fine and it is a legal filename.
also the .zz. works fine it is the .z. that doesn't.
this is part of my naming convention for images and I have thousands of images, plus associated html
david
jeffmott
07-04-2003, 09:25 PM
i can't see this as a documented feature of netscapeNeither can I. That is why I used the word mistakingly.is is part of my naming convention for images and I have thousands of images, plus associated htmlIt's situations like this where Perl comes in very handy to have on your local system. You can get a Win32 version from ActiveState (http://www.activestate.com/Products/ActivePerl/).# rename .z. to _z_
for (glob '*') {
my $old = $_;
next unless s/\.z\./_z_/gi;
rename $old, $_ or die $!;
}# open HTML files, change .z. to _z_
use Fcntl qw{:flock :seek};
for (glob '*.html') {
open PAGE, $_ or die $!;
flock PAGE, LOCK_EX or die $!;
my @data;
while (<PAGE>) {
s/\.z\./_z_/gi;
push @data, $_;
}
seek PAGE, 0, SEEK_SET or die $!;
print PAGE @data or die $!;
truncate PAGE, 0 or die $!;
close PAGE or die $!;
}
**note: code untested
dsanger
07-04-2003, 10:08 PM
thanks but basically it is a netscape bug which they ought to fix. i'd like to hear from the netscape folks.
ds
blufive
07-05-2003, 03:19 PM
Both work fine for me in Mozilla Firebird (which is effectively mozilla 1.4, which is effectively Netscape 7.1)
It's unlikely to be mistaking it for a zip file - if it was, you'd be getting some sort of save dialog. In any case, Moz & family pay far more attention to the HTTP mime-type than the filename.
All that said, I'm at a loss about what could be happening.