User destroying their own files with Notepad++

Issues with installing under all Linux Distributions

User destroying their own files with Notepad++

Postby tarikakyol8 » Sat Jun 13, 2020 10:20 am

 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 42 times
Libre Office 6.3.6.2 . Dual boot Windows10 and Ubuntu 20.04
tarikakyol8
 
Posts: 5
Joined: Sat Jun 13, 2020 10:13 am

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

Postby John_Ha » Sat Jun 13, 2020 1:07 pm

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.
John_Ha
Volunteer
 
Posts: 7899
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

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

Postby tarikakyol8 » Sat Jun 13, 2020 2:26 pm

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 41 times
Libre Office 6.3.6.2 . Dual boot Windows10 and Ubuntu 20.04
tarikakyol8
 
Posts: 5
Joined: Sat Jun 13, 2020 10:13 am

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

Postby John_Ha » Sat Jun 13, 2020 3:05 pm

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.
John_Ha
Volunteer
 
Posts: 7899
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

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

Postby RoryOF » Sat Jun 13, 2020 4:19 pm

I confirm John_Ha's findings. The archive that should be the file is incomplete and contains only random garbage.
Apache OpenOffice 4.1.8 on Xubuntu 20.04.1 (mostly 64 bit version) and very infrequently on Win2K/XP
User avatar
RoryOF
Moderator
 
Posts: 31735
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

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

Postby tarikakyol8 » Sat Jun 13, 2020 6:27 pm

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 44 times
linux_setup.odt
bad odt file, 102 pages
(24.08 KiB) Downloaded 44 times
Libre Office 6.3.6.2 . Dual boot Windows10 and Ubuntu 20.04
tarikakyol8
 
Posts: 5
Joined: Sat Jun 13, 2020 10:13 am

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

Postby RoryOF » Sat Jun 13, 2020 6:33 pm

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.8 on Xubuntu 20.04.1 (mostly 64 bit version) and very infrequently on Win2K/XP
User avatar
RoryOF
Moderator
 
Posts: 31735
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

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

Postby tarikakyol8 » Mon Jun 15, 2020 1:18 pm

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
tarikakyol8
 
Posts: 5
Joined: Sat Jun 13, 2020 10:13 am

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

Postby John_Ha » Mon Jun 15, 2020 1:47 pm

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   Expand viewCollapse view
<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#&lt;#aÇ┐©:Ù=ÓP#p#Ş├<text:tab/>P<text:line-break/>FÉdp#ë#&apos;¥«V#·#j)#túèr┤&gt;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&lt;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¡¨Ó{ş&lt;#k}▓c#NxgævqÓ#┐µ╚òØ®TäÈ°Aº##�█Ƹ¼ş&quot;~¬V®#f#óÃO─[¨Ô#Ò■çù;▓øê¹#&lt;`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: 7899
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

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

Postby John_Ha » Mon Jun 15, 2020 2:01 pm

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
Clipboard01.png
.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.
John_Ha
Volunteer
 
Posts: 7899
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

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

Postby tarikakyol8 » Mon Jun 15, 2020 2:41 pm

@ 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...

1. original document_2.png
original .odt document opened with LO


2. document in notepadqq_2.png
document opened in Notepadqq text editor
2. document in notepadqq_2.png (109.42 KiB) Viewed 1320 times


3. document opened in LO after overwritten by notepadqq.png
document opened in LO after overwritten by notepadqq


Thanks,
Libre Office 6.3.6.2 . Dual boot Windows10 and Ubuntu 20.04
tarikakyol8
 
Posts: 5
Joined: Sat Jun 13, 2020 10:13 am

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

Postby John_Ha » Mon Jun 15, 2020 3:28 pm

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.
John_Ha
Volunteer
 
Posts: 7899
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: User destroying their own files with Notepad++

Postby Hagar Delest » Tue Jun 16, 2020 12:50 pm

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...
LO 6.4.6 on Xubuntu 20.04 and Windows 10.
User avatar
Hagar Delest
Moderator
 
Posts: 29078
Joined: Sun Oct 07, 2007 9:07 pm
Location: France


Return to Linux

Who is online

Users browsing this forum: No registered users and 3 guests