Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

MacIntosh Characters

Posted on 1998-10-19
5
Medium Priority
?
160 Views
Last Modified: 2010-03-05
I have a script that reads a filesystem on NT that is a MAC filespace and copies files from it to a UNIX NFS mounted filesystem. Needless to say, MAC users put files there with funky characters. My program runs on NT and although not appearing to have a problem opening the file and reading it prior to writing it, it is having a problem writing the new file.
 
After the write, I am checking for a value returned from the write to exist, or if the expected write amount is not equal to the written amount, I check $!. The value for that variable is simply

"DEST write failed: "

ADDITIONAL INFORMATION AVAILABLE AT:

http://www.experts-exchange.com/jsp/qShow.jsp?ta=perl&qid=10089262 

Help!
Angel
0
Comment
Question by:aleyva
  • 2
  • 2
5 Comments
 

Author Comment

by:aleyva
ID: 1205494
Edited text of question
0
 

Author Comment

by:aleyva
ID: 1205495
Adjusted points to 200
0
 
LVL 2

Expert Comment

by:WileyKat
ID: 1205496
just FYI, we Mac users do NOT put files with funky characters there. The funky characters are the fault of our Mac filesystem, which you and we have no control over. so don't criticize our file-handling techniques.
0
 
LVL 2

Expert Comment

by:WileyKat
ID: 1205497
just FYI, we Mac users do NOT put files with funky characters there. The funky characters are the fault of our Mac filesystem, which you and we have no control over. so don't criticize our file-handling techniques.
0
 
LVL 2

Accepted Solution

by:
ventolin earned 400 total points
ID: 1205498
I am not sure what your question is, but this snippet might be your answer:

while (<FILE>) {
                # convert everything to unix first
                s/\015\012/\012/g;
                s/\015/\012/g;
                # if they want dos format
                s/\012/\015\012/g if ($mode eq "dos");
                # if they want mac format
                s/\012/\015/g if ($mode eq "mac");
                $results .= $_;
                }

-ventolin
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A year or so back I was asked to have a play with MongoDB; within half an hour I had downloaded (http://www.mongodb.org/downloads),  installed and started the daemon, and had a console window open. After an hour or two of playing at the command …
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
Six Sigma Control Plans

927 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question