diff --git a/Classes/PHPExcel/Calculation.php b/Classes/PHPExcel/Calculation.php
index 1b010163..48fb4a42 100644
--- a/Classes/PHPExcel/Calculation.php
+++ b/Classes/PHPExcel/Calculation.php
@@ -2920,11 +2920,11 @@ class PHPExcel_Calculation {
// echo 'Element with value '.$val.' is an Operand, Variable, Constant, String, Number, Cell Reference or Function
';
if (preg_match('/^'.self::CALCULATION_REGEXP_FUNCTION.'$/i', $val, $matches)) {
- $val = preg_replace('/\s/','',$val);
+ $val = preg_replace('/\s/u','',$val);
// echo 'Element '.$val.' is a Function
';
if (isset(self::$_PHPExcelFunctions[strtoupper($matches[1])]) || isset(self::$_controlFunctions[strtoupper($matches[1])])) { // it's a function
$stack->push('Function', strtoupper($val));
- $ax = preg_match('/^\s*(\s*\))/i', substr($formula, $index+$length), $amatch);
+ $ax = preg_match('/^\s*(\s*\))/ui', substr($formula, $index+$length), $amatch);
if ($ax) {
$stack->push('Operand Count for Function '.strtoupper($val).')', 0);
$expectingOperator = TRUE;
diff --git a/Classes/PHPExcel/Helper/HTML.php b/Classes/PHPExcel/Helper/HTML.php
index 48845aea..9e30ae8a 100644
--- a/Classes/PHPExcel/Helper/HTML.php
+++ b/Classes/PHPExcel/Helper/HTML.php
@@ -723,7 +723,7 @@ class PHPExcel_Helper_HTML
}
protected function parseTextNode(DOMText $textNode) {
- $domText = preg_replace('/\s+/', ' ', ltrim($textNode->nodeValue));
+ $domText = preg_replace('/\s+/u', ' ', ltrim($textNode->nodeValue));
$this->stringData .= $domText;
$this->buildTextRun();
}