Marc Gueury wrote:
I tried to read the string documentation and I am quite lost.
http://www.mozilla.org/projects/xpcom/string-guide.html and mostly http://lxr.mozilla.org/mozilla/source/xpcom/string/public/nsStringAPI.h
I have a javascript program that read HTML. Sometimes, the HTML contains some non-ascii character. Then I call a C function with the string.
I was using the "string" IDL type before and I was loosing non-ascii character. But finally, my program was working fine. My program understand UTF8 so, I tried several things :-) But mostly this.
I have defined a IDL function like this:
interface nsIFoo : nsISupports { myFunction(in AUTF8String mystring); };
There is a C++ function generated that got that signature
NS_IMETHOD MyFunction(const nsACString& mystring)
Then there I try to get a (char *) pointing to the data. I tried a lot of things like wstring. But without success.
For example this const char * data; NS_CStringGetData(mystring, &data); -> core dump ?
This should work. Can you capture a stack trace corresponding to the core dump? Or, can you provide a simplified testcase that demonstrates the problem (source code)?
-Darin _______________________________________________ Mozilla-xpcom mailing list [EMAIL PROTECTED] http://mail.mozilla.org/listinfo/mozilla-xpcom
