On 31-08-2010 at 10:54:11 Robert Partyka <bob...@wdg.pl> wrote:

I notice today strange problem with PHPTAL, when I start to use
nederlands national characters in template.
I get such error:

Exception thrown while processing template
From /var/www/test-nt/deny/files/index-main.html around line 34
exception 'PHPTAL_ParserException' with message 'Tag closure mismatch, expected < /div > (opened in line 34) but found < /iv> >' in /var/www/test-nt/deny/files/index-main.html:34
Stack trace:
#0 /var/www/test-nt/deny/lib/PHPTAL/PHPTAL/Dom/SaxXmlParser.php(194): PHPTAL_Dom_DocumentBuilder->onElementClose('iv>') #1 /var/www/test-nt/deny/lib/PHPTAL/PHPTAL.php(1113): PHPTAL_Dom_SaxXmlParser->parseString(Object(PHPTAL_Dom_DocumentBuilder), 'parse()
#3 /var/www/test-nt/deny/lib/PHPTAL/PHPTAL.php(651): PHPTAL->prepare()
#4 /var/www/test-nt/index.php(62): PHPTAL->execute()
#5 {main}

Line which make error looks like this:
<div class="box_title">Kopiëren van een rapport</div>

so the close tag is correct. Whole error disaperar when I change "ë"
into "e". Template file is UTF-8 (no BOM).

It does look like encoding-related issue, but I cannot reproduce it in current version of PHP:


Perhaps specific bytes that cause the problem didn't survive copying via e-mail. Could you send me a file (preferably minimized test case) that causes the problem?

You could also check out copy from SVN (https://svn.motion-twin.com/phptal/trunk), install PHPUnit (https://svn.motion-twin.com/phptal/trunk/README) and run `phpunit` in root of the working copy. Does your copy pass the tests?

regards, Kornel

PHPTAL mailing list

Reply via email to