Yes, you are right! I changed to nsString, and use NS_ConvertUTF16toUTF8(charset), and everything goes well.
Thank you very much!!! - zz "Boris Zbarsky" <bzbar...@mit.edu> ??????:xogdntdt19fzdp_unz2dnuvz_hydn...@mozilla.org... > zz wrote: >> nsCString charset; > > Make that nsString. Then you'll have to convert to UTF8 to get the string > to pass to the encoder. > >> so, the same nsCString_external & nsAString problem. > > No, this is a different problem. You're passing a narrow string to a > function that wants a wide one. > >> The real problem is can I use nsIDocumentEncoder to serialize a >> nsDOMDocument in an embedding program? > > Look to me like you should be able to, yes. > > -Boris _______________________________________________ dev-embedding mailing list dev-embedding@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-embedding