You are here: PSPad forum > English discussion forum > Help. Accidentally converted text to (hex?)
Posted by: SereneSavage | Date: 2017-05-21 01:00 | IP: IP Logged
I was typing out a lua script and something fell on the keyboard. Pspad started acting weird so I was trying different settings to fix it. Suddenly all my text turned to boxes containing 4 letters or numbers (hex?). Like an idiot I saved my work over the original file and now I can't get it back to text.
Can this file be converted back or must I rewrite it from scratch? I don't know much about programming, only got my toe in the water by writing some skins. Help?
Posted by: pspad | Date: 2017-05-21 03:24 | IP: IP Logged
Menu view / hex mode. This option switch between text and hex mode.
Posted by: SereneSavage | Date: 2017-05-21 04:04 | IP: IP Logged
Hex Edit MODE is greyed out. It won't let me.
Posted by: pspad | Date: 2017-05-21 05:11 | IP: IP Logged
OK. It means your file is directly open in HEX mode.
Open program settings / Direct edit
Change autodetectbinary=0
Try to open your file again
Posted by: SereneSavage | Date: 2017-05-21 05:36 | IP: IP Logged
That got rid of the boxes and numbers but now its all text like this:
¢žW§uªÒzÒ-zeZ–ç°Šwh·©¢»pŠwhÂø
Posted by: pspad | Date: 2017-05-21 07:20 | IP: IP Logged
Can you send me your file to support mail?
What PSPad version do you use?
PSpad has no functionality to convert file to this one or encode it...
Posted by: SereneSavage | Date: 2017-05-21 07:54 | IP: IP Logged
I'd send it if I could find the support address.
I'll zip and send my copy of pspad as well.
I'm using version 4.5.7 (2450) and have done so for years on my old XP machine but recently switched to Win 7.
(what's the address?)
Edited 1 time(s). Last edit at 2017-05-21 08:04 by SereneSavage.
Posted by: pspad | Date: 2017-05-21 08:21 | IP: IP Logged
PSPad / Help / about
Posted by: SereneSavage | Date: 2017-05-21 20:11 | IP: IP Logged
Sent.
I figured out how I did it. Open a text file and type this into it:
function Compare_Initialize(skin, window)
g_c = {}
g_c.sources_label = {}
g_c.sources_1 = {}
g_c.sources_2 = {}
-- find pairs list
local folder = GetElementValue(skin, "pairspath", "file")
folder = folder:gsub("%%5c", "\\"):gsub("%%20", " "):gsub("/", "\\")
g_c.pairspath = folder
Compare_Read_Pairs(skin, window)
end
Go to Edit, special conversion, Base64 -> Ansi. Now save the file. Close and re-open. Now you have a mangled file like mine. If you can figure out how to change it back to text I would really like to know.
Posted by: Stefan | Date: 2017-05-22 07:33 | IP: IP Logged
SereneSavage:Sent.I figured out how I did it.
....
Go to Edit, special conversion, Base64 -> Ansi.
...
If you can figure out how to change it back to text ...
You mean
Edit, Special conversion, Base64 -> Text?
How about the reverse steps
Edit, Special conversion, Text -> Base64 ?
That may not work for 100%, as e.g. equal sign has special meaning in Base64.
So you may have to edit or even rewrite your code.
For next time better utilize menu
"Settings > Program Settings... >> Backup"
.
.
.
--
Stefan (pleased user since 1722)
Do you know you can spend Jan a beer? (click here)
Inofficial FAQs + Infos + Special Settings
Editor PSPad - freeware editor, © 2001 - 2024 Jan Fiala, Hosted by Webhosting TOJEONO.CZ, design by WebDesign PAY & SOFT, code Petr Dvořák, Privacy policy and GDPR