home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.perl
- Path: sparky!uunet!caen!uvaarpa!mmdf
- From: Dov Grobgeld <dov@menora.weizmann.ac.il>
- Subject: Re: Wanted: Perl script to convert file names from Unix to DOS
- Message-ID: <1992Dec13.082341.22989@uvaarpa.Virginia.EDU>
- Sender: mmdf@uvaarpa.Virginia.EDU (Mail System)
- Reply-To: dov@menora.weizmann.ac.il
- Organization: The Internet
- Date: Sun, 13 Dec 1992 08:23:41 GMT
- Lines: 29
-
- In his message ayman@eecs.umich.edu (Ayman I. Kayssi) said:
-
- | :
- | : >It would be nice if the algorithm used can be
- | : >inverted, so that the Unix filenames can be extracted back from their
- | : >DOS translation.
- | :
- | : In general, I don't think that will be possible unless the Unix filenames
- | : are already in 8x3 format with no unacceptable characters. The only way
- | : you could do it reliably would be to save a table and use it for the
- | : conversion back.
- |
- | I thought so too, but maybe there is some magic way to do it.
- |
-
- You cannot do a one-to-one mapping between a larger set and a smaller set.
- Since the set of allowed unix file names is much larger than the set of
- allowed DOS file names, your case is hopeless. It is mathematically impossible
- to do what you want to do. The only way around it is by a providing a
- lookup table of how you did the translation.
-
- --
- ___ ___
- / o \ o \
- Dov Grobgeld ( o o ) o |
- The Weizmann Institute of Science, Israel \ o /o o /
- "Where the tree of wisdom carries oranges" | | | |
- _| |_ _| |_
-
-