# HG changeset patch # User Ben Schmidt # Date 1316997810 -36000 # Node ID 98a5de42afcc73b81164e50da880c7c13d7b33f6 # Parent c3ee2bfaeb02c0f56e7f3248a0b09a2aa45fedae Allow list texts to include real UTF-8 characters, as documented. diff -r c3ee2bfaeb02 -r 98a5de42afcc ChangeLog --- a/ChangeLog Sat Sep 10 12:23:40 2011 +1000 +++ b/ChangeLog Mon Sep 26 10:43:30 2011 +1000 @@ -1,3 +1,4 @@ + o Allow list texts to include real UTF-8 characters, as documented o Fix bug where the normal listtext would be sent when unsubscribing from the nomail version of the list o New listtext naming scheme diff -r c3ee2bfaeb02 -r 98a5de42afcc src/unistr.c --- a/src/unistr.c Sat Sep 10 12:23:40 2011 +1000 +++ b/src/unistr.c Mon Sep 26 10:43:30 2011 +1000 @@ -530,6 +530,7 @@ unistr *us; char *ret; char u[5]; + int len; us = unistr_new(); @@ -562,8 +563,15 @@ continue; } } else { - unistr_append_usascii(us, str, 1); + u[0] = *str; + len = 1; str++; + while (*str && (unsigned char)u[0] > 0x7F) { + u[0] = *str; + len++; + str++; + } + unistr_append_utf8(us, str - len, len); } }