Closed Bug 261218 Opened 20 years ago Closed 20 years ago

gtkmozembed assumes uri are latin1-encoded

Categories

(Core Graveyard :: Embedding: GTK Widget, defect)

x86
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla1.8alpha5

People

(Reporter: Biesinger, Assigned: Biesinger)

Details

Attachments

(1 file, 1 obsolete file)

whereas they are in UTF-8.
Attached patch patch (obsolete) — Splinter Review
Attachment #159858 - Flags: superreview?(darin)
Attachment #159858 - Flags: review?(blizzard)
Comment on attachment 159858 [details] [diff] [review]
patch

hmm, while I'm here, I can get rid of the other AssignWithConversion too
Attachment #159858 - Attachment is obsolete: true
Attachment #159858 - Flags: superreview?(darin)
Attachment #159858 - Flags: review?(blizzard)
Attachment #159861 - Flags: superreview?(darin)
Attachment #159861 - Flags: review?(blizzard)
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla1.8beta
Attachment #159861 - Flags: superreview?(darin) → superreview+
Comment on attachment 159861 [details] [diff] [review]
patch v2

Actually, with gtk 1.2 the uris are in local encoding, which isn't always
utf-8.	So you need to special case this or port it for gtk 1.2, too.
Attachment #159861 - Flags: review?(blizzard) → review-
Comment on attachment 159861 [details] [diff] [review]
patch v2

blizzard: that's why I'm using CopyNativeToUnicode in gtk1's SetURI. (I
verified that this works)

the uris gotten off nsIURI are in UTF-8 even in gtk1 (the EmbedProgress change)
Attachment #159861 - Flags: review- → review?(blizzard)
Hang on.  What does CopyNativeToUnicode do in the case where the native encoding
is not UTF-8 and we happen to be using gtk2?  In that case, we should still be
using UTF-8 for the string because all strings internal to gtk2 are UTF-8.  I'll
bet that will still copy using the encoding specified in LANG (without looking
at the code, of course.)
Comment on attachment 159861 [details] [diff] [review]
patch v2

yes, in such a case it would use $LANG, but that's ok because
CopyNativeToUnicode in this patch is inside a gtk1 ifdef.

gtk2 correctly uses CopyUTF8toUTF16
Comment on attachment 159861 [details] [diff] [review]
patch v2

Sold.
Attachment #159861 - Flags: review?(blizzard) → review+
Target Milestone: mozilla1.8beta → mozilla1.8alpha5
thanks, checked in

Checking in embedding/browser/gtk/src/EmbedPrivate.cpp;
/cvsroot/mozilla/embedding/browser/gtk/src/EmbedPrivate.cpp,v  <--  EmbedPrivate.cpp
new revision: 1.47; previous revision: 1.46
done
Checking in embedding/browser/gtk/src/EmbedProgress.cpp;
/cvsroot/mozilla/embedding/browser/gtk/src/EmbedProgress.cpp,v  <-- 
EmbedProgress.cpp
new revision: 1.15; previous revision: 1.14
done
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: