Closed
Bug 622528
Opened 9 years ago
Closed 9 years ago
Open RTF document in Thunderbird with OpenOffice is not correct Ascii mode
Categories
(Core Graveyard :: File Handling, defect, minor)
Tracking
(Not tracked)
RESOLVED
FIXED
mozilla2.0b10
People
(Reporter: nicolas.paour, Assigned: Matti)
References
()
Details
Attachments
(1 file)
1.13 KB,
patch
|
bzbarsky
:
review+
benjamin
:
approval2.0+
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0) Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 6.1; fr; rv:1.9.2.11) Gecko/20101013 Lightning/1.0b2 Thunderbird/3.1.5 If you open an RTF document in Thunderbird, this document is open as text mode in OpenOffice or LibreOffice. If you save the RTF document and open with OpenOffice or LibreOffice, all is correct Reproducible: Always Steps to Reproduce: 1.Double-clic on RTF attach document 2.Select : Open with "swriter" 3.OpenOffice or LibreOffice propose an ASCII filter 4.RTF was open in Texte mode Workaround : 1.Save the RTF document on the desktop 2.double-cic on the desktop rtf document 3.Rtf is open corectly in OpenOffice or LibreOffice
Reporter | ||
Updated•9 years ago
|
Assignee | ||
Comment 1•9 years ago
|
||
What is the mime-type given in the email for this attachment ?
Reporter | ||
Comment 2•9 years ago
|
||
Hello, Content-Type: application/octet-stream; name="sandra.RTF" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="sandra.RTF" Nicolas
Reporter | ||
Comment 3•9 years ago
|
||
For the moment, I found a workaround. 1- edit "mimeTypes.rdf" 2- insert these lines <RDF:Description RDF:about="urn:mimetype:text/richtext" NC:fileExtensions="rtf" NC:description="RTF Document" NC:value="text/richtext" NC:editable="true"> <NC:handlerProp RDF:resource="urn:mimetype:handler:text/richtext"/> </RDF:Description> 3- When you receive a RTF file, Select : Open with "swriter" 4- Swriter open directly the RTF file Nicolas
Assignee | ||
Comment 4•9 years ago
|
||
Do you have an entry for application/octet-stream in your mimetypes.rdf ? Which file extensions is used if OO opens it as text ?
Reporter | ||
Comment 5•9 years ago
|
||
Hello, There no entry for application/octet-stream in mimetypes.rdf. For your information, we use the default mimetypes.rdf given by thunderbird. Nicolas
Assignee | ||
Comment 6•9 years ago
|
||
Which file extensions is used if OO opens it as text ? (Gecko saves the file to the temp directory and gives the temp file an extension that it tries to detect with information from the mimetypes.rdf and the windows registry. Are there binary chars in the first 1k bytes of the document or is that text ?
Reporter | ||
Comment 7•9 years ago
|
||
Hello, It is an RTF file. Firts characters are not binary: {\rtf1\ansi\deff0\adeflang1025 {\fonttbl{\f0\froman\fprq2\fcharset0 Times New Rom (...) file extension is .rtf rtf is a standard format http://en.wikipedia.org/wiki/Rich_Text_Format Nicolas
Assignee | ||
Comment 8•9 years ago
|
||
It seems that the unknown content-decoder detects this as text and it changes the extension to something like .txt. I don't know why the unknown content-decoder is called here, but the default entry for rtf in the windows registry doesn't contain a "Content-type" entry :-( Maybe we should just ship with a default set of known mime-types, that would also fix other problems with for example pdf files.
Status: UNCONFIRMED → NEW
Component: General → File Handling
Ever confirmed: true
Product: Thunderbird → Core
QA Contact: general → file-handling
![]() |
||
Comment 9•9 years ago
|
||
> Maybe we should just ship with a default set of known mime-types We do. See http://hg.mozilla.org/mozilla-central/file/b0fe7e0df71a/uriloader/exthandler/nsExternalHelperAppService.cpp#l548 Should we just add RTF there? Note that there should be no issues with PDF, since the unknown decoder sniffs for it by magic number.
Assignee | ||
Comment 10•9 years ago
|
||
There are a bunch of problems with content-types that most users can't resolve themselves. The case with PDF is a little bit different, we can get wrong mime-types in mimetypes.rdf from mails or http servers that send a wrong content-type. bug 484369 is an example for that. Another different case for swf is bug 626025 I think we should add text/richtext to our internal list, that would fix this bug report.
Reporter | ||
Comment 11•9 years ago
|
||
great idea :-) Many thanks Nicolas
Assignee | ||
Comment 12•9 years ago
|
||
The correct content-type is application/rtf -> http://www.iana.org/assignments/media-types/application/rtf Seamonkey selects application/rtf for an .rtf Mail-attachment instead of application/octet-stream with this patch
Attachment #504613 -
Flags: review?(bzbarsky)
![]() |
||
Comment 13•9 years ago
|
||
Comment on attachment 504613 [details] [diff] [review] one line patch to add application/rtf r=me Do you need this landed, or can you do that yourself?
Attachment #504613 -
Flags: review?(bzbarsky) → review+
![]() |
||
Comment 14•9 years ago
|
||
Erm, and I guess this would need approval to land before Gecko 2.0... I think it's fine to do that, personally, but I might be biased here. ;) If you're not worrying about landing for 2.0, then there's no problem, of course.
Assignee | ||
Comment 15•9 years ago
|
||
Comment on attachment 504613 [details] [diff] [review] one line patch to add application/rtf requesting approval because this a line line fix with low risk.
Attachment #504613 -
Flags: approval2.0?
Updated•9 years ago
|
Attachment #504613 -
Flags: approval2.0? → approval2.0+
Assignee | ||
Updated•9 years ago
|
Keywords: checkin-needed
Updated•9 years ago
|
Assignee: nobody → matti
Comment 16•9 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/7699976cd9de
Status: NEW → RESOLVED
Closed: 9 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → mozilla2.0b10
Updated•4 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•