From 5eeaa0b673a18f5b79e3b3f11efd60fce6fa751f Mon Sep 17 00:00:00 2001 From: mikl <> Date: Fri, 18 Apr 2008 17:12:59 +0000 Subject: Fix #660 --- framework/Web/Javascripts/TJSON.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'framework/Web/Javascripts') diff --git a/framework/Web/Javascripts/TJSON.php b/framework/Web/Javascripts/TJSON.php index b30a65d8..a52a0634 100644 --- a/framework/Web/Javascripts/TJSON.php +++ b/framework/Web/Javascripts/TJSON.php @@ -146,6 +146,10 @@ class TJSON return (float) $var; case 'string': + if (($g=Prado::getApplication()->getGlobalization(false))!==null && + strtoupper($enc=$g->getCharset())!='UTF-8') + $var=iconv($enc, 'UTF-8', $var); + // STRINGS ARE EXPECTED TO BE IN ASCII OR UTF-8 FORMAT $ascii = ''; $strlen_var = strlen($var); @@ -755,4 +759,4 @@ class TJSON } -?> \ No newline at end of file +?> -- cgit v1.2.3