Page 1 of 1

User destroying their own files with Notepad++

Posted: Sat Jun 13, 2020 10:20 am
by tarikakyol8
 Edit: Split from [Hint] How did I fix my ODT file 
Hello,

My .odt file that I worked on 3 weeks is now showing different characters that I can not make sense. Original document was about 10 pages. And I opened the file from Libre office in Ubuntu and Open Office in Windows 10. If I try to unzip the file to reach the contents.xml document I get an error saying:

"$ unzip linux_setup5.odt
Archive: linux_setup5.odt
End-of-central-directory signature not found."

The file is attached to this post

Could you please show me a way to fix this file. Is it related to wrong encoding? Thanks

Tarik

Re: [Hint] How did I fix my ODT file

Posted: Sat Jun 13, 2020 1:07 pm
by John_Ha
The uploaded file has only a few lines in it and opens with LO. The error message suggested the ZIP container has been truncated though it unzips with 7-ZIP and passes the 7-ZIP file test.
Vmware Workstation 15 Player
https://itsfoss.com/install-vmware-player-ubuntu-1310/
https://my.vmware.com/en/web/vmware/fre ... layer/15_0
Right click → Properties → Check “Allow executing file as program”
sudo ~/Downloads/Vmware-Player*
See [Tutorial] How to find and un-delete AOO temporary files for detailed instructions on how to

a) use Previous Versions (W7 and later) to recover previous versions of the file (is there something similar on MacOS and Linux?);

b) recover your file as it was when you last opened or saved it, or as it was when it was last saved with AutoRecovery;

c) find previous versions of the file in the folder it is located in, but which have since been deleted;

d) find any temporary files AOO wrote while you were editing the file but which have not yet been deleted;

e) un-delete the temporary files AOO wrote while you were editing the file, and then deleted. d) and e) will recover your file as it was when you last opened or you last saved it.

If you cannot follow the instructions ask someone with more PC skills to help you. Act quickly - the longer you wait the more likely any temporary files are to be deleted.

Re: [Hint] How did I fix my ODT file

Posted: Sat Jun 13, 2020 2:26 pm
by tarikakyol8
I am sorry, I uploaded a wrong file. It is correct in this reply.

Sample of code I see when I open with LO-ibre Office:

㐂H�GUc��2�#O%V�#��tG
##�*���~�fM�T��"�CR�#��#�###��#��㈅D
� lO��#�|"�T5f'Ε#�{�}Z#��ݻ���#�N����ֺ���v��?��hID�� �d�#�Ly"9#�x�V^r&y����#ۇ�h"�s��zJ#�c�:#�E�(�)!�y�Xd}i����}nIɜ�v�#�#O##�h�#���<x)�*#���'#9v�ɢ4�^/
�dA#��8�A�d�K!�#�)##N��k�

I see that my temp folder is empty in Ubuntu, so no luck on recovering the previous versions.

Thanks again

Re: [Hint] How did I fix my ODT file

Posted: Sat Jun 13, 2020 3:05 pm
by John_Ha
Your second file contains only garbage. It looks like random binary data and nothing can be recovered from it.

See the tutorial.

Re: [Hint] How did I fix my ODT file

Posted: Sat Jun 13, 2020 4:19 pm
by RoryOF
I confirm John_Ha's findings. The archive that should be the file is incomplete and contains only random garbage.

Re: [Hint] How did I fix my ODT file

Posted: Sat Jun 13, 2020 6:27 pm
by tarikakyol8
Dear John_Ha and RoryOF . Thanks for your efforts and checking my file.

Unfortunately, because of a bug that is also mentioned in other forms about the last version of Ubuntu (20.04), there is a permission problem of the tmp folder and Libre Office has not been saving any temporary files of the documents. I noticed this when I checked the Path location and it doesn't even sow a path for temporary files.
https://askubuntu.com/questions/1046890 ... s-in-18-04

I hope that I can find another way to recover or fix my document.

Best Regards,
Tarik

Re: [Hint] How did I fix my ODT file

Posted: Sat Jun 13, 2020 6:33 pm
by RoryOF
Try an undelete utility; depending on drive size you may need to let it run overnight.

In linux setup 4.odt, I am getting 102 pages, but the small snippets of "text" on each page seem like garbage.

Re: [Hint] How did I fix my ODT file

Posted: Mon Jun 15, 2020 1:18 pm
by tarikakyol8
Dear all, I was able to repeat the problem. I know how the document turned into this status.

One day I opened the .odt document by a text editor, specifically Notepad++ in Windows, and when I closed the program it overwrote the original document as it shows :-/

I used the Testdisk program for Linux deleted document recovery, however it only showed me already bad versions of the document, maybe because the document is not actually deleted but overwritten with the same filename.

I will also try to recover it in the Windows system. I was able to reach this document from both operating systems in a shared disk.

Re: [Hint] How did I fix my ODT file

Posted: Mon Jun 15, 2020 1:47 pm
by John_Ha
linux.setup is a flat file (ie it is not a well formed zipped .odt file). It is full of binary garbage - there is no user content.

linux.setup 4 is a well formed, zipped .odt file. When I extract content.xml it is grossly corrupted with binary garbage. It is beyond repair and there is no user data.

Code: Select all

<text:p text:style-name="Preformatted_20_Text">îA¡õF=┼R┴╗$´{#úë«#}¦#³×O╝6Ä#ËÏ7║jt</text:p>
<text:p text:style-name="P1">ÒÉéHÛ®GUcÒ╬2Ò#O%Vè#¸▀tG</text:p>
<text:p text:style-name="P1">İiTÌÀFg│█{¾;9ùãÜ║)ÍÎùÍÍÍÃy]Uu+ÙNugó(ıó4N█L#┌×Ğ®Ø5öRk]�4Ò|rn߶Ú#&apos;åÒ■¥]{¥Ò¯o┐Úåø6{J³ıÂ#─»┴Ê┬à �Â#¨®+´áI#q#e#ôu_ùä###pÉ%# 7## #IDAT#<#aÇ┐©:Ù=ÓP#p#Ş├<text:tab/>P<text:line-break/>FÉdp#ë#&apos;¥«V#·#j)#túèr┤>Y3╬´Úÿy¤▒{K´ğ(├üùÿ=|#İçi#ä#C##´Ó,8ç</text:p>
<text:p text:style-name="P1">#$á#e</text:p>
<text:p text:style-name="P1">(i8º<text:line-break/>#\,æ##$#!##v154#/ı#CúÁ¤-##~TÊZ9#ãóQP#ã└Xx/ÓÑØö└F9<d-³ÒÀ┐tfÌr9#D#áª�ã#╬─Í┼îã#T©¾Å ­Ş ·_#/\PàĞò±Á§Y;î®®┤+j&apos;ÖH#-=#ïÊ###òw╩###ü²rS┤8qÍá┼×ıWë+vg▄ÆßjŞOJ#┌`#M##qî┘#¦{ 8t§eÿnßI#ã£│IÆL-¡îÀÿ┘=#æj¡¨Ó{ş<#k}▓c#NxgævqÓ#┐µ╚òØ®TäÈ°Aº##�█Ƹ¼ş"~¬V®#f#óÃO─[¨Ô#Ò■çù;▓øê¹#<`HµDç6<text:tab/>
You can specify a different path for the temporary files in Tools > Options > OO > Paths.

Opening a .odt file with anything other AOO or LO etc should only be done as an emergency measure to repair a damaged file which will not open. Always work on a copy of the file so the original can never be corrupted further.

Re: [Hint] How did I fix my ODT file

Posted: Mon Jun 15, 2020 2:01 pm
by John_Ha
tarikakyol8 wrote:I know how the document turned into this status.

One day I opened the .odt document by a text editor, specifically Notepad++ in Windows, and when I closed the program it overwrote the original document as it shows :-/
I somehow doubt that as, when a .odt file is opened with Notepad++, it shows a lot of binary content and is not editable.

Re: [Hint] How did I fix my ODT file

Posted: Mon Jun 15, 2020 2:41 pm
by tarikakyol8
@ John_Ya

It is caused either by the Notepad++ that I use in Windows or the Notepadqq that I use in Ubuntu .

I'm showing below another document turning into similar fashion...
original .odt document opened with LO
original .odt document opened with LO
document opened in Notepadqq text editor
document opened in Notepadqq text editor
2. document in notepadqq_2.png (109.42 KiB) Viewed 7504 times
document opened in LO after overwritten by notepadqq
document opened in LO after overwritten by notepadqq
Thanks,

Re: [Hint] How did I fix my ODT file

Posted: Mon Jun 15, 2020 3:28 pm
by John_Ha
You should not be opening a .odt file with Notepad++ (or any other editor) as any edit you make will corrupt the .odt file.

Re: User destroying their own files with Notepad++

Posted: Tue Jun 16, 2020 12:50 pm
by Hagar Delest
An ODT file is a zipped file, containing other files.
But it remains somewhat a file in itself. Thus, if you open it with a brute editor, it will parse the content as it comes instead of interpreting each content separately. It will provide you a mere suite of nonsense as shown by the screenshots. And when you save the file, it will just write nonsense, it will not rebuild any of the sub files that were not interpreted at all.

It's like a recipe: to make a cake (your file), you read the recipe (the ODF workings) and you proceed with the ingredients (content in sub files) per detailed steps. You could take all the ingredients at once, put them in a bowl, mix and wait. But the result is far from the picture on the recipe book...