Closed
Bug 943296
Opened 11 years ago
Closed 9 years ago
widget/gtk/nsDragService.cpp should assume Gtk uses UTF-8
Categories
(Core :: Widget: Gtk, defect)
Core
Widget: Gtk
Tracking
()
RESOLVED
FIXED
mozilla44
Tracking | Status | |
---|---|---|
firefox44 | --- | fixed |
People
(Reporter: hsivonen, Assigned: hsivonen, Mentored)
References
Details
Attachments
(1 file, 1 obsolete file)
11.74 KB,
patch
|
karlt
:
review+
|
Details | Diff | Splinter Review |
widget/gtk/nsDragService.cpp calls nsPrimitiveHelpers::ConvertPlatformPlainTextToUnicode and nsPrimitiveHelpers::ConvertUnicodeToPlatformPlainText. Since we already assume that *nix platforms use UTF-8 as the platform encoding these days, nsDragService should just assume UTF-8, too.
Assignee | ||
Comment 1•9 years ago
|
||
(In reply to Henri Sivonen (:hsivonen) from comment #0) > Since we already > assume that *nix platforms use UTF-8 as the platform encoding these days, > nsDragService should just assume UTF-8, too. That's not quite the right reason to fix this. The right reason is that for APIs other than those that deal with file system paths, Gtk has been UTF-8-only since version 2. The code in question here was migrated from Gtk1 until in compiled under Gtk2--leaving around cruft that was no longer needed or even correct--when it should have been rewritten as UTF-8-only for Gtk2 like nsClipboard.cpp was during the Gtk2 migration.
Mentor: hsivonen
Assignee | ||
Comment 2•9 years ago
|
||
The old code uses C strings instead of XPCOM strings. That's sad but out of scope for this patch.
Assignee: nobody → hsivonen
Status: NEW → ASSIGNED
Assignee | ||
Comment 3•9 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=bbc553ea0021
Assignee | ||
Comment 4•9 years ago
|
||
Attachment #8669627 -
Attachment is obsolete: true
Attachment #8672971 -
Flags: review?(karlt)
Assignee | ||
Comment 5•9 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=f393144e890d
Comment 6•9 years ago
|
||
Comment on attachment 8672971 [details] [diff] [review] Assume UTF-8, v2 As you hint, this should all be replaced by gtk_selection_data_set_text()/_get_text()/_uris(), a bit like nsClipboard. Some code could even be shared. This patch is kind of a step in that direction, thanks.
Attachment #8672971 -
Flags: review?(karlt) → review+
https://hg.mozilla.org/mozilla-central/rev/07fe0365048c
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
status-firefox44:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla44
You need to log in
before you can comment on or make changes to this bug.
Description
•