PRUnichar buf[256]; PRUnichar *retbuf = nsnull;  if (s) { retbuf = UTF8ToUCS2(s, strlen(s), buf, 256); if(nsnull == retbuf) { return -1; } } int ret = cvt_S(ss, retbuf, width, prec, flags);  if (retbuf != buf) { PR_DELETE(retbuf); } return ret;
NS_ConvertUTF8toUTF16 utf16Val(s); return cvt_S(ss, utf16Val.get(), width, prec, flags);
static int cvt_s(SprintfState *ss, const char *s, int width,                 int prec, int flags){    // convert s from UTF8 to PRUnichar*    // Fix me !!!    PRUnichar buf[256];    PRUnichar *retbuf = nsnull;    if (s) {        retbuf = UTF8ToUCS2(s, strlen(s), buf, 256);                if(nsnull == retbuf) {            return -1;        }    }    int ret = cvt_S(ss, retbuf, width, prec, flags);    if (retbuf != buf) {        PR_DELETE(retbuf);    }    return ret;}