--- php-5.2.5/ext/mbstring/original_mbstring.c Mon Sep 24 20:51:36 2007 +++ php-5.2.5/ext/mbstring/mbstring.c Mon Mar 03 18:27:06 2008 @@ -1484,7 +1484,8 @@ /* analyze mime type */ if (SG(sapi_headers).mimetype && - strncmp(SG(sapi_headers).mimetype, "text/", 5) == 0) { + (strncmp(SG(sapi_headers).mimetype, "text/", 5) == 0 || + strncmp(SG(sapi_headers).mimetype, "application/xhtml+xml", 21) == 0)) { if ((s = strchr(SG(sapi_headers).mimetype,';')) == NULL){ mimetype = estrdup(SG(sapi_headers).mimetype); } else {