// FIXME use this performance improvement (not changing because this is STABLE branch): return str_replace(array('\\', '"'), array('\\\\', '\\"'), $str);
/* ===== FIXME: this list is not used in 1.5.x, but if we need it, unless this differs between all our string function wrappers, we should store this info in the session
// only use mbstring with the following character sets
//
$sq_strlen_mb_charsets = array(
'utf-8',
'big5',
'gb2312',
'gb18030',
'euc-jp',
'euc-cn',
'euc-tw',
'euc-kr'
);
// now we can use mb_strlen() if needed
//
if (in_array($charset, $sq_strlen_mb_charsets)
&& in_array($charset, sq_mb_list_encodings()))
===== */
//FIXME: is there any reason why this cannot be a static global array used by all string wrapper functions?
/* ===== FIXME: this list is not used in 1.5.x, but if we need it, unless this differs between all our string function wrappers, we should store this info in the session
// only use mbstring with the following character sets
//
$sq_strpos_mb_charsets = array(
'utf-8',
'big5',
'gb2312',
'gb18030',
'euc-jp',
'euc-cn',
'euc-tw',
'euc-kr'
);
// now we can use mb_strpos() if needed
//
if (in_array($charset, $sq_strpos_mb_charsets)
&& in_array($charset, sq_mb_list_encodings()))
===== */
//FIXME: is there any reason why this cannot be a static global array used by all string wrapper functions?
/* ===== FIXME: this list is not used in 1.5.x, but if we need it, unless this differs between all our string function wrappers, we should store this info in the session
// only use mbstring with the following character sets
//
$sq_substr_mb_charsets = array(
'utf-8',
'big5',
'gb2312',
'gb18030',
'euc-jp',
'euc-cn',
'euc-tw',
'euc-kr'
);
// now we can use mb_substr() if needed
//
if (in_array($charset, $sq_substr_mb_charsets)
&& in_array($charset, sq_mb_list_encodings()))
===== */
//FIXME: is there any reason why this cannot be a global array used by all string wrapper functions?
/* ===== FIXME: this list is not used in 1.5.x, but if we need it, unless this differs between all our string function wrappers, we should store this info in the session
// only use mbstring with the following character sets
//
$sq_substr_replace_mb_charsets = array(
'utf-8',
'big5',
'gb2312',
'gb18030',
'euc-jp',
'euc-cn',
'euc-tw',
'euc-kr'
);
// now we can use our own implementation using
// mb_substr() and mb_strlen() if needed
//
if (in_array($charset, $sq_substr_replace_mb_charsets)
&& in_array($charset, sq_mb_list_encodings()))
===== */
//FIXME: is there any reason why this cannot be a global array used by all string wrapper functions?