From 6d9dd89e1aced78b46f5607a851dbcc2a9b2b0df Mon Sep 17 00:00:00 2001 From: nlopess Date: Sun, 13 Feb 2005 22:50:06 +0000 Subject: [PATCH] fix charset detection in CHM --- docs/chm/common.php | 2 +- docs/pt_BR/make_chm_index.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/chm/common.php b/docs/chm/common.php index 2f0151f6..2f9cfe55 100755 --- a/docs/chm/common.php +++ b/docs/chm/common.php @@ -61,7 +61,7 @@ function convertCharset($buf) // Returns the name of character set in the given document function detectDocumentCharset($doc) { - if (preg_match("//iU", $doc, $reg)) { + if (preg_match('/]+CHARSET=["\'\s]?([\w\d-]+)["\'\s]?\s*>/iS', $doc, $reg)) { return $reg[1]; } return false; diff --git a/docs/pt_BR/make_chm_index.html b/docs/pt_BR/make_chm_index.html index 3949cff9..a2701768 100755 --- a/docs/pt_BR/make_chm_index.html +++ b/docs/pt_BR/make_chm_index.html @@ -10,7 +10,7 @@