diff options
author | mikl <> | 2008-04-18 17:12:59 +0000 |
---|---|---|
committer | mikl <> | 2008-04-18 17:12:59 +0000 |
commit | 5eeaa0b673a18f5b79e3b3f11efd60fce6fa751f (patch) | |
tree | 57276db7b946164c97534459ee80f92a2eb51f26 /framework | |
parent | 8e4607f6e92258738c5293b3d7609d34bec73969 (diff) |
Fix #660
Diffstat (limited to 'framework')
-rw-r--r-- | framework/Web/Javascripts/TJSON.php | 6 | ||||
-rw-r--r-- | framework/Web/UI/TPage.php | 8 |
2 files changed, 12 insertions, 2 deletions
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 +?>
diff --git a/framework/Web/UI/TPage.php b/framework/Web/UI/TPage.php index 529a6b60..2f7e1b4f 100644 --- a/framework/Web/UI/TPage.php +++ b/framework/Web/UI/TPage.php @@ -282,6 +282,12 @@ class TPage extends TTemplateControl $this->setAdapter(new TActivePageAdapter($this));
+ // Decode Callback postData from UTF-8 to current Charset
+ if (($g=$this->getApplication()->getGlobalization(false))!==null &&
+ strtoupper($enc=$g->getCharset())!='UTF-8')
+ foreach ($this->_postData as $k=>$v)
+ $this->_postData[$k]=iconv('UTF-8',$enc.'//IGNORE',$v);
+
Prado::trace("Page onPreInit()",'System.Web.UI.TPage');
$this->onPreInit(null);
@@ -1264,4 +1270,4 @@ class TPageStateFormatter }
}
-?>
\ No newline at end of file +?>
|