Closed Bug 40608 Opened 25 years ago Closed 4 years ago

text/unicode used in drag and drop not a valid IANA media type

Categories

(Core :: XUL, defect, P3)

defect

Tracking

()

RESOLVED INACTIVE
Future

People

(Reporter: blizzard, Assigned: mikepinkerton)

References

(Blocks 1 open bug)

Details

(Keywords: arch, dataloss, intl)

The data type that we are using to move around unicode strings isn't an actual registered mime type. The valid registered types listed are here: ftp://ftp.isi.edu/in-notes/iana/assignments/media-types/media-types we should probably change it to text/x-moz-unicode or figure out if there's a better way to describe text/plain with some kind of content encoding. Are there any platform specific restrictions here? Do some platforms require text/unicode?
okies.
Status: NEW → ASSIGNED
Target Milestone: --- → M20
Mass-moving all M20-M30 XPToolkit bugs to Future
Target Milestone: M20 → Future
what does unicode look like if you view it in a text editor?
on win32, it becomes the CF_UNICODE data flavor which can be viewed in word or notepad. for apps that don't understand unicode, like wordPad it is translated to CF_TEXT.
OS: Linux → All
Hardware: PC → All
Is it Mozilla or the app change changes it from text/unicode -> CF_UNICODE?
mozilla does this internally.
->pinkerton. Is this causing any defective behavior?
Assignee: trudelle → pinkerton
Status: ASSIGNED → NEW
It doesn't matter much (to me) what mozilla does internally, but text/unicode is being exported to other X apps through the Xdnd specifcaiton, and other apps cannot be expected to support made up mimetypes. What should be exported through Xdnd is at least: UTF8_STRING (http://www.pps.jussieu.fr/~jch/software/UTF8_STRING/) And probably some valid mime type for what text/unicode represents. "text/plain; charset=utf-16[be/le]" seems like a candidate; rfc 2781 mentions that utf-16 can't be used as a charset for text/ subtypes because it doesn't represent CR LF as CR LF, but then goes ahead and says it's legitimate to do so for HTTP as an exception, so perhaps it could be justified here as well.
Blocks: 106708
Keywords: mozilla1.1
Keywords: mozilla1.1mozilla1.2
*** Bug 181079 has been marked as a duplicate of this bug. ***
Transferring dataloss keyword from duplicate bug.
Keywords: dataloss
Keywords: mozilla1.3
This bug is marked as blocking Bug #106708. However, that bug has been fixed, so does this bug still exist (yes it does as a dup has been made from a build after the Bug #106708 fix went in), or does this bug not really block Bug #106708? I'm just trying to keep things tidy and accurate, so comments are welcome.
It must be the other way around for bug 106708. Resetting dependencies.
No longer blocks: 106708
Depends on: 106708
Bug 106708 is marked OS: PC, this bug is marked OS:ALL. That's why this bug is still open - bug 106708 was a PC only fix. This is still an issue for other OS's. Notes: This bug causes other incorrect behaviour (such as bug 71786), which bug 106708 does not fix. See bug 71786 comment 13 and the related attachment. My concern is that changing this may mean rewriting large parts of Mozilla's DND code to expect UTF8 text rather than Unicode. Adding this as blocking Bug 71786.
Blocks: 71786
By the definitions on <http://bugzilla.mozilla.org/bug_status.html#severity> and <http://bugzilla.mozilla.org/enter_bug.cgi?format=guided>, crashing and dataloss bugs are of critical or possibly higher severity. Only changing open bugs to minimize unnecessary spam. Keywords to trigger this would be crash, topcrash, topcrash+, zt4newcrash, dataloss.
Severity: normal → critical
Keywords: mozilla1.2nsbeta1
Keywords: arch
adt: nsbeta1-
Keywords: nsbeta1nsbeta1-
As an implementer of XDND, I would also like to point out that utf-16le is used by mozilla on little-endian machines and utf-16be on big endian machines. This makes it hard for an application that receives a drop to determine what to use (le or be). Mozilla might very well be running on a different machine than the drop receiving application. I would prefer if you switched to UTF8_STRING (as GNOME and KDE now uses that), but the alternatives in comment 8 are also ok, i.e. "text/plain; charset=utf-16[be/le]" Thanks.
Keywords: intl
I wouldn't like to file duplicate, so when I drag and drop from Firefox to OpenOffice if I get: Kako izbe&cacute;i “d&zcaron;ank” hranu instead of: Kako izbeći “džank” hranu that relates to this bug, right? It is really horrible for non-english languages.
GTK+ appears to assume that "text/plain" is encoded in ISO-8859-1 so drag-and-drop from Firefox to any GTK+ application produces rubbish if the copied text contains non-ASCII characters. Using "UTF8_STRING" or "text/plain;charset=utf-8" as the drag type should give the correct result.
Blocks: 179658

Closing this bug as resolved:inactive, last update was 16 years ago. If this is still reproducible on the latest Firefox versions, please do re-open it.

Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → INACTIVE
You need to log in before you can comment on or make changes to this bug.