Hi and thanks for writing.
looking at your patch you are asking to support chinese char in variable name enclosed in brachets, right?
I agree to expand the namespace of variables name in template, but matching the following regular expression:
'[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*' (if you ask why read this http://it2.php.net/language.variables\).
Is this enough to support chinese charset?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
modify class.smarttemplateparser.php as follow can add support for Chinese Character
// Replace Scalars
// Support Chinese Character. by afeng
// if (preg_match_all('/{([a-zA-Z0-9_. >]+)}/', $page, $var))
if (preg_match_all('/{((?:(?:[\x81-\xfe].)|(?:[a-zA-Z0-9_. >]))+)}/', $page, $var))
Hi and thanks for writing.
looking at your patch you are asking to support chinese char in variable name enclosed in brachets, right?
I agree to expand the namespace of variables name in template, but matching the following regular expression:
'[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*' (if you ask why read this http://it2.php.net/language.variables\).
Is this enough to support chinese charset?