bug 261218 URIs are UTF-8 encoded, not latin1

r=blizzard sr=darin


git-svn-id: svn://10.0.0.236/trunk@163003 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
cbiesinger%web.de 2004-09-30 14:01:25 +00:00
parent 84d984be90
commit 7c12aabd2e
2 changed files with 7 additions and 3 deletions

View File

@ -84,6 +84,8 @@
#include "EmbedStream.h"
#ifdef MOZ_WIDGET_GTK2
#include "GtkPromptService.h"
#else
#include "nsNativeCharsetUtils.h"
#endif
#ifdef MOZ_ACCESSIBILITY_ATK
@ -390,7 +392,9 @@ void
EmbedPrivate::SetURI(const char *aURI)
{
#ifdef MOZ_WIDGET_GTK
mURI.AssignWithConversion(aURI);
// XXX: Even though NS_CopyNativeToUnicode is not designed for non-filenames,
// we know that it will do "the right thing" on UNIX.
NS_CopyNativeToUnicode(nsDependentCString(aURI), mURI);
#endif
#ifdef MOZ_WIDGET_GTK2

View File

@ -85,7 +85,7 @@ EmbedProgress::OnStateChange(nsIWebProgress *aWebProgress,
nsXPIDLCString uriString;
RequestToURIString(aRequest, getter_Copies(uriString));
nsString tmpString;
tmpString.AssignWithConversion(uriString);
CopyUTF8toUTF16(uriString, tmpString);
// is it the same as the current URI?
if (mOwner->mURI.Equals(tmpString))
@ -125,7 +125,7 @@ EmbedProgress::OnProgressChange(nsIWebProgress *aWebProgress,
RequestToURIString(aRequest, getter_Copies(uriString));
nsString tmpString;
tmpString.AssignWithConversion(uriString);
CopyUTF8toUTF16(uriString, tmpString);
// is it the same as the current uri?
if (mOwner->mURI.Equals(tmpString)) {