| Author |
working with NTBackup Logfiles: backup##.log
|
|
| Marcel 2006-02-21, 7:55 am |
| I am having problems working with the logfiles created by ntbackup.
They open in "vi" and with "cat".
But they seem to be binary when looking at them with "less" or trying
to put the content into an array.
When printing the Array all I get is: "=FF=FES"
Couldn't find anything in this group so far that would at least give me
a hint on how to convert or read the file.
Any suggestions?
Thanks already in advance,
Marcel
| |
|
|
Marcel wrote:
> I am having problems working with the logfiles created by ntbackup.
> They open in "vi" and with "cat".
> But they seem to be binary when looking at them with "less" or trying
> to put the content into an array.
> When printing the Array all I get is: "=FF=FES"
> Couldn't find anything in this group so far that would at least give me
> a hint on how to convert or read the file.
>
> Any suggestions?
>
>
> Thanks already in advance,
> Marcel
They are Unicode files.
perldoc perluniintro
| |
| Marcel 2006-02-22, 3:55 am |
| Thanks for the Tip.
I figured out how to print it, but I am still having trouble sending
the Text via SMTP (Net::SMTP).
All I retrieve as recipient is "nothing" / just an empty mail.
I guess I still have to convert the unicode into something else (maybe
latin1).
But how? I gave it a try with recode and the sample sub in perldoc
perluniintro. But neither one did the job.
Marcel
| |
|
| Marcel wrote:
> Thanks for the Tip.
> I figured out how to print it, but I am still having trouble sending
> the Text via SMTP (Net::SMTP).
> All I retrieve as recipient is "nothing" / just an empty mail.
> I guess I still have to convert the unicode into something else (maybe
> latin1).
> But how? I gave it a try with recode and the sample sub in perldoc
> perluniintro. But neither one did the job.
>
> Marcel
Perl natively uses utf-8, Windows utf-16. email uses probably some
variant of ASCII, ( Check your email header for Content-Type. One of
mine says: "Content-Type: text/plain; charset=US-ASCII" ), plus you
have both ends (sender and recipient) to worry about...
Is that enough yet to keep you busy? :-)
I would convert the log files to ASCII from the get-go ( using Perl or
a
DOS batch file). I doubt you will lose any information if you are using
an English verision of Windows.
| |
| Marcel 2006-02-23, 7:55 am |
| Thanks for your help Oliver!
Got it up and running.
Following did the trick:
open (IN, "<:encoding(utf16)", "$file") or die "$!";
open (OUT, ">:encoding(iso-8859-1)", "$file.out") or die "$!";
print OUT <IN>;
regards,
Marcel
|
|
|
|