Apache OpenOffice (AOO) Bugzilla – Issue 99646
Opening empty *.odt File (0 bytes) -> "Character Encoding"-Dialog instead of a *newly* created Document
Last modified: 2009-03-06 10:28:23 UTC
I just found out that when I create a new (empty) file like this: touch foo.odt And I try to open it in OOo-Writer I get prompted for the Character Encoding and line separation to use. Instead of this behaviour it would be very helpful just to check whether the file has a length of zero and create a new Document of the appropriate type. This should work not only for .odt, but for .ods / .odp aswell. Thanks for your time.
Filetypes are recognized by their header, not the suffix. If a file does not contain a valid header it is interpreted as plain-text file. What will happen if someone renames his file from hello.odt to hello.ooo? OOO must have a chance to recognize the correct file type...
Closed, current implemented solution is the best IMO.
I fear you didn't get my point: I'm talking about /empty/ files with a length of zero bytes. In Microsoft Windows the user is given the opportunity, to right-click in any directory and choose "Create new ... >> New OpenOffice.org-Writer Document". On Ubuntu Linux (gnome / metacity), I don't have the opportunity to do this because there are no such options in the context menu. So the only way to create a new OO File is to choose "Create new ... >> Empty File" and rename it to something like "My New Document.odt". When I open this document, OO won't recognize it because of missing headers. At this point it should check the file size and if its greater than 0 bytes the well-known "Character Encoding"-Dialog is shown. Otherwise - in case the file is empty - OO should just act as if a new Document has been created via the built-in "New Document"-Button and let the user work with this one. Sorry for my poor English skills but I hope you get the point. :-)
That is not fully true... I really got what you said. But you did not regard, that generating an empty document via context menu on Windows does not build a zero-size file... An empty document is not an empty file! A file having header and format information will be generated by this - without any text content! A zero size file named foo.odt will also not be recognized on Windows!
Closed.
*** Issue 99956 has been marked as a duplicate of this issue. ***