1--TEST-- 2mb_send_mail() test 5 (lang=Simplified Chinese) 3--EXTENSIONS-- 4mbstring 5--SKIPIF-- 6<?php 7if (substr(PHP_OS, 0, 3) == 'WIN') { 8 die('skip.. Not valid for Windows'); 9} 10if (!function_exists("mb_send_mail") || !mb_language("Simplified Chinese")) { 11 die("skip mb_send_mail() not available"); 12} 13if (!@mb_internal_encoding('GB2312')) { 14 die("skip GB2312 encoding is not available on this platform"); 15} 16?> 17--INI-- 18sendmail_path=/bin/cat 19mail.add_x_header=off 20--FILE-- 21<?php 22$to = 'example@example.com'; 23 24/* default setting */ 25mb_send_mail($to, mb_language(), "test"); 26 27/* Simplified Chinese (HK-GB-2312) */ 28if (mb_language("simplified chinese")) { 29 mb_internal_encoding('GB2312'); 30 mb_send_mail($to, "���� ".mb_language(), "����"); 31} 32?> 33--EXPECTF-- 34To: example@example.com 35Subject: %s 36MIME-Version: 1.0 37Content-Type: text/plain; charset=%s 38Content-Transfer-Encoding: %s 39 40%s 41To: example@example.com 42Subject: =?HZ-GB-2312?B?fnsyYlFpfn0gU2ltcGxpZmllZCBD?= 43 =?HZ-GB-2312?B?aGluZXNl?= 44MIME-Version: 1.0 45Content-Type: text/plain; charset=HZ-GB-2312 46Content-Transfer-Encoding: 7bit 47 48~{2bQi~} 49