moriyoshi Wed Nov 13 03:13:36 2002 EDT Modified files: /php4/ext/mbstring mbstring.c Log: Fixed mb_encode_mimeheader() to work with languages other than Japanese and English Index: php4/ext/mbstring/mbstring.c diff -u php4/ext/mbstring/mbstring.c:1.140 php4/ext/mbstring/mbstring.c:1.141 --- php4/ext/mbstring/mbstring.c:1.140 Wed Nov 13 02:40:11 2002 +++ php4/ext/mbstring/mbstring.c Wed Nov 13 03:13:34 2002 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: mbstring.c,v 1.140 2002/11/13 07:40:11 moriyoshi Exp $ */ +/* $Id: mbstring.c,v 1.141 2002/11/13 08:13:34 moriyoshi Exp $ */ /* * PHP4 Multibyte String module "mbstring" (currently only for Japanese) @@ -2784,17 +2784,10 @@ RETURN_FALSE; } } else { - switch (MBSTRG(current_language)) { - case mbfl_no_language_japanese: - charset = mbfl_no_encoding_2022jp; - break; - case mbfl_no_language_english: - charset = mbfl_no_encoding_8859_1; - transenc = mbfl_no_encoding_qprint; - break; - default: - charset = mbfl_no_encoding_utf8; - break; + const mbfl_language *lang = mbfl_no2language(MBSTRG(current_language)); + if (lang != NULL) { + charset = lang->mail_charset; + transenc = lang->mail_header_encoding; } }
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php