From 560338d15d2b84eb5b3cffaaf200c040866d4943 Mon Sep 17 00:00:00 2001 From: wei <> Date: Tue, 1 Aug 2006 02:10:24 +0000 Subject: Fixed #306 --- framework/I18N/core/MessageFormat.php | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'framework/I18N/core/MessageFormat.php') diff --git a/framework/I18N/core/MessageFormat.php b/framework/I18N/core/MessageFormat.php index dab7434c..3faa663d 100644 --- a/framework/I18N/core/MessageFormat.php +++ b/framework/I18N/core/MessageFormat.php @@ -161,6 +161,10 @@ class MessageFormat public function format($string,$args=array(), $catalogue=null, $charset=null) { if(empty($charset)) $charset = $this->getCharset(); + + //force args as UTF-8 + foreach($args as $k => $v) + $args[$k] = I18N_toUTF8($v, $charset); $s = $this->formatString(I18N_toUTF8($string, $charset),$args,$catalogue); return I18N_toEncoding($s, $charset); } -- cgit v1.2.3