X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=webcit%2Fvcard_edit.c;h=97ef83fa988c572ba30bf0f002b20c9be5ba3333;hb=c23bb7e270cd155347161b69f14523117a7fa464;hp=f56fd1c09e3f780f819734c6263917c2baa8b600;hpb=26430a89804bc57299292ebffa70df74c65b10b1;p=citadel.git diff --git a/webcit/vcard_edit.c b/webcit/vcard_edit.c index f56fd1c09..97ef83fa9 100644 --- a/webcit/vcard_edit.c +++ b/webcit/vcard_edit.c @@ -503,7 +503,8 @@ void display_vcard(StrBuf *Target, const char *vcard_source, char alpha, int ful long msgnum) { struct vCard *v; char *name; - char buf[SIZ]; + StrBuf *Buf; + StrBuf *Buf2; char this_alpha = 0; v = vcard_load((char*)vcard_source); ///TODO @@ -512,9 +513,12 @@ void display_vcard(StrBuf *Target, const char *vcard_source, char alpha, int ful name = vcard_get_prop(v, "n", 1, 0, 0); if (name != NULL) { - utf8ify_rfc822_string(name); - strcpy(buf, name); - this_alpha = buf[0]; + Buf = NewStrBufPlain(name, -1); + Buf2 = NewStrBufPlain(NULL, StrLength(Buf)); + StrBuf_RFC822_to_Utf8(Buf2, Buf, WC->DefaultCharset, NULL); + this_alpha = ChrPtr(Buf)[0]; + FreeStrBuf(&Buf); + FreeStrBuf(&Buf2); } if (storename != NULL) {