If you C string is coming in as ISO-8859-1 whose characters have the same value in 
Unicode,
something like the follow should work:

void copyToDOMString(const char* iso8859String, DOMString& str) {
const int BUFSIZ = 1024;
XMLCh buf[BUFSIZ+1];
const char* currentSrc = iso8859String;
XMLCh* currentDst = buf;
for(int i = 0; i < BUFSIZ && *currentSrc; i++) {
   *currentDst++ = *currentSrc++;
}
*currentDst = 0;
str.operator=(buf);
//
//   append any other long blocks to the string
//      (rarely entered)
while(*currentSrc) {
        currentDst = buf;
        for(int i = 0; i < BUFSIZ && *currentSrc; i++) {
                *currentDst++ = *currentSrc++;
        }
        *currentDst = 0;
        str.append(currentDst);
}
}



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to