Re: Help me recover my Perl script
by CountZero (Bishop) on Dec 25, 2009 at 16:27 UTC
|
"Normal" characters interspersed with "NULL" characters: that looks very much like a file with "wide" (or multi-byte) characters such as Unicode uses.Did you try opening the file with the (regular) Windows Notepad? Version 5.1 (part of Windows XP) allows you to choose the encoding when opening and saving files.
CountZero A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James
| [reply] |
Re: Help me recover my Perl script
by Old_Gray_Bear (Bishop) on Dec 25, 2009 at 12:05 UTC
|
I suspect that you are toasted, unless you have the auto-save plugin installed; you will just have to re-enter your code. My preferred editor (vim) is configured to auto-save every minute because I too was burned this way, Back In the Day....
----
I Go Back to Sleep, Now.
OGB
| [reply] |
|
|
| [reply] |
|
|
| [reply] |
|
|
Did you try running strings command on the file?. It may strip non-printable characters
| [reply] |
Re: Help me recover my Perl script
by Anonymous Monk on Dec 25, 2009 at 05:52 UTC
|
contact Notepad++ support? run through iconv? | [reply] |
Re: Help me recover my Perl script
by Khen1950fx (Canon) on Dec 25, 2009 at 08:13 UTC
|
I use the Bluefish editor. If I click on File, it'll show "open recent" or "open location". Does Notepad++ have that? Try it if it does. Merry Christmas! | [reply] |
|
|
I've heard it doesn't, but it might keep auto-backups (if you turned it on) somewhere in %temp%
| [reply] |
Re: Help me recover my Perl script
by Jorge_de_Burgos (Beadle) on Dec 25, 2009 at 22:38 UTC
|
Would you send me the file so I try to get something out of it for you as a Christmas present? | [reply] |
Re: Help me recover my Perl script
by paragkalra (Scribe) on Dec 25, 2009 at 06:01 UTC
|
Can anyone please guide me on how to use 'iconv'.
If I am not wrong its a Linux command.
| [reply] |
Re: Help me recover my Perl script
by paragkalra (Scribe) on Dec 25, 2009 at 06:43 UTC
|
All I want to know is what should be my input and output file format while using 'iconv' with Perl script.
| [reply] |
|
|
whatever Notepad++ thinks it should be?
| [reply] |
Re: Help me recover my Perl script
by paragkalra (Scribe) on Dec 27, 2009 at 11:19 UTC
|
When I try to view my roasted file through 'less' command I get following output:
# less Test.pl
"Test.pl" may be a binary file. See it anyway?
Is there a way I can convert this binary file to its initial readable state.
@Jorge_de_Burgos - Thanks for your courtesy. BTW how can I share my script with you. Can you please PM your email ID to me.
| [reply] |
|
|
perl -pi.bak -e 's/\0//g' scriptfile
You will have a backup copy after that, appropriately named scriptfile.bak. | [reply] [d/l] [select] |