User destroying their own files with Notepad++

Issues with installing under all GNU/Linux Distributions
Post Reply
tarikakyol8
Posts: 5
Joined: Sat Jun 13, 2020 10:13 am

User destroying their own files with Notepad++

Post 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
Attachments
linux_setup2.odt
Bad ODT file
(10.67 KiB) Downloaded 287 times
Libre Office 6.3.6.2 . Dual boot Windows10 and Ubuntu 20.04
John_Ha
Volunteer
Posts: 9584
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

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

Post 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.
LO 6.4.4.2, Windows 10 Home 64 bit

See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.

Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
tarikakyol8
Posts: 5
Joined: Sat Jun 13, 2020 10:13 am

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

Post 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
Attachments
linux_setup.odt
bad odt file, 102 pages
(24.08 KiB) Downloaded 264 times
Libre Office 6.3.6.2 . Dual boot Windows10 and Ubuntu 20.04
John_Ha
Volunteer
Posts: 9584
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

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

Post 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.
LO 6.4.4.2, Windows 10 Home 64 bit

See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.

Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
User avatar
RoryOF
Moderator
Posts: 34612
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

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

Post by RoryOF »

I confirm John_Ha's findings. The archive that should be the file is incomplete and contains only random garbage.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
tarikakyol8
Posts: 5
Joined: Sat Jun 13, 2020 10:13 am

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

Post 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
Attachments
linux setup 4.odt
another version of the same file
(22.33 KiB) Downloaded 279 times
linux_setup.odt
bad odt file, 102 pages
(24.08 KiB) Downloaded 265 times
Libre Office 6.3.6.2 . Dual boot Windows10 and Ubuntu 20.04
User avatar
RoryOF
Moderator
Posts: 34612
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

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

Post 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.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
tarikakyol8
Posts: 5
Joined: Sat Jun 13, 2020 10:13 am

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

Post 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.
Libre Office 6.3.6.2 . Dual boot Windows10 and Ubuntu 20.04
John_Ha
Volunteer
Posts: 9584
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

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

Post 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.
LO 6.4.4.2, Windows 10 Home 64 bit

See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.

Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
John_Ha
Volunteer
Posts: 9584
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

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

Post 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.
Attachments
.odt file opened in Notepad++
.odt file opened in Notepad++
LO 6.4.4.2, Windows 10 Home 64 bit

See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.

Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
tarikakyol8
Posts: 5
Joined: Sat Jun 13, 2020 10:13 am

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

Post 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 7485 times
document opened in LO after overwritten by notepadqq
document opened in LO after overwritten by notepadqq
Thanks,
Libre Office 6.3.6.2 . Dual boot Windows10 and Ubuntu 20.04
John_Ha
Volunteer
Posts: 9584
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

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

Post 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.
LO 6.4.4.2, Windows 10 Home 64 bit

See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.

Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
User avatar
Hagar Delest
Moderator
Posts: 32657
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: User destroying their own files with Notepad++

Post 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...
LibreOffice 7.6.2.1 on Xubuntu 23.10 and 7.6.4.1 portable on Windows 10
Post Reply