diff --git a/embedding/browser/powerplant/source/UMacUnicode.cpp b/embedding/browser/powerplant/source/UMacUnicode.cpp index f3708ad5ef4e..6be30dd29d6d 100644 --- a/embedding/browser/powerplant/source/UMacUnicode.cpp +++ b/embedding/browser/powerplant/source/UMacUnicode.cpp @@ -102,13 +102,13 @@ void UMacUnicode::Str255ToString(const Str255& aStr255, nsString& aText) PRInt32 outLength = 512; rv = gUnicodeDecoder->Convert((char *) &aStr255[1], &inLength, buffer, &outLength); if (NS_SUCCEEDED(rv)) { - aText.SetString(buffer, outLength); + aText.Assign(buffer, outLength); } } if (NS_FAILED(rv)) { // NS_ASSERTION(0, "error: charset covnersion"); - aText.SetString((char *) &aStr255[1], aStr255[0]); + aText.AssignWithConversion((char *) &aStr255[1], aStr255[0]); } } @@ -125,7 +125,7 @@ static void GetFileSystemCharset(nsString & fileSystemCharset) NS_ASSERTION(NS_SUCCEEDED(rv), "error getting platform charset"); if (NS_FAILED(rv)) - aCharset.SetString("x-mac-roman"); + aCharset.AssignWithConversion("x-mac-roman"); } fileSystemCharset = aCharset; }