[TYPO3-core] RFC #11361: Backend TYPO3 AJAX-Interface: json encoded result empty if it contains non-utf-8 characters
Benjamin Mack
benni at typo3.org
Fri Jun 19 12:01:37 CEST 2009
Hi Masi,
yes, because I use the variable "requestCharset" that is set in the
constructor.
// get charset from current AJAX request (which is expected to be utf-8)
preg_match('/;\s*charset\s*=\s*([a-zA-Z0-9_-]*)/i',
$_SERVER['CONTENT_TYPE'], $contenttype);
$charset = $GLOBALS['LANG']->csConvObj->parse_charset($contenttype[1]);
if ($charset && $charset != $this->requestCharset) {
$this->requestCharset = $charset;
}
Well, if it delivers something else than expected then we should set it
not via this code, right?
Do you think it's better to hard-code utf-8 in my patch? I'd be happy to
correct my patch.
All the best,
Benni.
More information about the TYPO3-team-core
mailing list