From eaa2835932fd73804bac85f77b399af42963b7b5 Mon Sep 17 00:00:00 2001 From: "bzbarsky%mit.edu" Date: Wed, 20 Apr 2005 15:39:24 +0000 Subject: [PATCH] Implement WriteUtf8Z. Bug 290914, r=biesi, sr=darin, a=asa --- xpcom/io/nsBinaryStream.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xpcom/io/nsBinaryStream.cpp b/xpcom/io/nsBinaryStream.cpp index bc60eea3661..5e00c36678b 100644 --- a/xpcom/io/nsBinaryStream.cpp +++ b/xpcom/io/nsBinaryStream.cpp @@ -57,6 +57,7 @@ #include "nsMemory.h" #include "prlong.h" #include "nsGenericFactory.h" +#include "nsString.h" NS_IMPL_ISUPPORTS3(nsBinaryOutputStream, nsIObjectOutputStream, nsIBinaryOutputStream, nsIOutputStream) @@ -222,8 +223,7 @@ nsBinaryOutputStream::WriteWStringZ(const PRUnichar* aString) NS_IMETHODIMP nsBinaryOutputStream::WriteUtf8Z(const PRUnichar* aString) { - NS_NOTREACHED("WriteUtf8Z"); - return NS_ERROR_NOT_IMPLEMENTED; + return WriteStringZ(NS_ConvertUTF16toUTF8(aString).get()); } NS_IMETHODIMP