summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Tänzer <neo@nhng.de>2011-11-23 01:20:01 +0100
committerMichael Tänzer <neo@nhng.de>2011-11-23 01:20:01 +0100
commit907f7d2c65a3f397435a9a75df85b5dc12f572cf (patch)
treed36615f0cb965729779f9c9198e0eaa48fb8f4d9
parent14688d978e6f173b1de9a59f7ad37e1836ba45e6 (diff)
downloadcacert-devel-907f7d2c65a3f397435a9a75df85b5dc12f572cf.tar.gz
cacert-devel-907f7d2c65a3f397435a9a75df85b5dc12f572cf.tar.xz
cacert-devel-907f7d2c65a3f397435a9a75df85b5dc12f572cf.zip
bug 827: convert UTF-8 characters to HTML entities before sendmail()
Signed-off-by: Michael Tänzer <neo@nhng.de>
-rw-r--r--scripts/send_thawte.php.txt24
1 files changed, 18 insertions, 6 deletions
diff --git a/scripts/send_thawte.php.txt b/scripts/send_thawte.php.txt
index ce0e73d..19ec223 100644
--- a/scripts/send_thawte.php.txt
+++ b/scripts/send_thawte.php.txt
@@ -27,7 +27,9 @@
while(!feof($fp))
{
$line = trim(fgets($fp, 4096));
- $lines_EN .= wordwrap($line, 75, "\n")."\n";
+ $line = wordwrap($line, 75, "\n")."\n";
+ $line = mb_convert_encoding($line, "HTML-ENTITIES", "UTF-8");
+ $lines_EN .= $line;
}
fclose($fp);
}
@@ -39,7 +41,9 @@
while(!feof($fp))
{
$line = trim(fgets($fp, 4096));
- $lines_DE .= wordwrap($line, 75, "\n")."\n";
+ $line = wordwrap($line, 75, "\n")."\n";
+ $line = mb_convert_encoding($line, "HTML-ENTITIES", "UTF-8");
+ $lines_DE .= $line
}
fclose($fp);
}
@@ -51,7 +55,9 @@
while(!feof($fp))
{
$line = trim(fgets($fp, 4096));
- $lines_NL .= wordwrap($line, 75, "\n")."\n";
+ $line = wordwrap($line, 75, "\n")."\n";
+ $line = mb_convert_encoding($line, "HTML-ENTITIES", "UTF-8");
+ $lines_NL .= $line
}
fclose($fp);
}
@@ -63,7 +69,9 @@
while(!feof($fp))
{
$line = trim(fgets($fp, 4096));
- $lines_FR .= wordwrap($line, 75, "\n")."\n";
+ $line = wordwrap($line, 75, "\n")."\n";
+ $line = mb_convert_encoding($line, "HTML-ENTITIES", "UTF-8");
+ $lines_FR .= $line
}
fclose($fp);
}
@@ -75,7 +83,9 @@
while(!feof($fp))
{
$line = trim(fgets($fp, 4096));
- $lines_ES .= wordwrap($line, 75, "\n")."\n";
+ $line = wordwrap($line, 75, "\n")."\n";
+ $line = mb_convert_encoding($line, "HTML-ENTITIES", "UTF-8");
+ $lines_ES .= $line
}
fclose($fp);
}
@@ -87,7 +97,9 @@
while(!feof($fp))
{
$line = trim(fgets($fp, 4096));
- $lines_RU .= wordwrap($line, 75, "\n")."\n";
+ $line = wordwrap($line, 75, "\n")."\n";
+ $line = mb_convert_encoding($line, "HTML-ENTITIES", "UTF-8");
+ $lines_RU .= $line
}
fclose($fp);
}