[Asterisk-cvs] asterisk/apps app_voicemail.c,1.87,1.88

markster at lists.digium.com markster at lists.digium.com
Mon May 10 09:17:45 CDT 2004


Update of /usr/cvsroot/asterisk/apps
In directory mongoose.digium.com:/tmp/cvs-serv16105/apps

Modified Files:
	app_voicemail.c 
Log Message:
Allow characterset to be specified (bug #1598)


Index: app_voicemail.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_voicemail.c,v
retrieving revision 1.87
retrieving revision 1.88
diff -u -d -r1.87 -r1.88
--- app_voicemail.c	10 May 2004 13:18:12 -0000	1.87
+++ app_voicemail.c	10 May 2004 13:27:39 -0000	1.88
@@ -238,6 +238,7 @@
 static char *emailsubject = NULL;
 static char fromstring[100];
 static char emailtitle[100];
+static char charset[32] = "ISO-8859-1";
 
 
 STANDARD_LOCAL_USER;
@@ -867,7 +868,7 @@
 
 			fprintf(p, "--%s\n", bound);
 		}
-		fprintf(p, "Content-Type: text/plain; charset=ISO-8859-1\nContent-Transfer-Encoding: 8bit\n\n");
+		fprintf(p, "Content-Type: text/plain; charset=%s\nContent-Transfer-Encoding: 8bit\n\n", charset);
 		strftime(date, sizeof(date), "%A, %B %d, %Y at %r", &tm);
 		if (emailbody) {
 			struct ast_channel *ast = ast_channel_alloc(0);
@@ -3828,6 +3829,7 @@
 		}
 		memset(fromstring,0,sizeof(fromstring));
 		memset(emailtitle,0,sizeof(emailtitle));
+		strncpy(charset, "ISO-8859-1", sizeof(charset) - 1);
 		if (emailbody) {
 			free(emailbody);
 			emailbody = NULL;
@@ -3840,6 +3842,8 @@
 			pbxskip = ast_true(s);
 		if ((s=ast_variable_retrieve(cfg, "general", "fromstring")))
 			strncpy(fromstring,s,sizeof(fromstring)-1);
+		if ((s=ast_variable_retrieve(cfg, "general", "charset")))
+			strncpy(charset,s,sizeof(charset)-1);
 		if ((s=ast_variable_retrieve(cfg, "general", "emailtitle")))
 			strncpy(emailtitle,s,sizeof(emailtitle)-1);
 		if ((s=ast_variable_retrieve(cfg, "general", "emailsubject")))




More information about the svn-commits mailing list