Smarty Forum Index Smarty
The discussions here are for Smarty, a template engine for the PHP programming language.

Smarty does not strip BOM from template files.

 
Post new topic   Reply to topic    Smarty Forum Index -> Bugs
View previous topic :: View next topic  
Author Message
AnrDaemon
Administrator


Joined: 03 Dec 2012
Posts: 1568

PostPosted: Tue Jul 15, 2014 6:03 pm    Post subject: Smarty does not strip BOM from template files. Reply with quote

Basically, what $subject says.
It is very convenient to have BOM in UTF-8 resource file - you can edit it with almost any tool and it'll be recognized correctly.
But when you start to assemble these resource files into a single entity, BOM is just a headache, nothing more.
If the result is required to contain byte order mark, it can be added in a postprocess filter, but internally engine should discard BOM's, IMO.
Back to top
View user's profile Send private message
mohrt
Administrator


Joined: 16 Apr 2003
Posts: 7366
Location: Lincoln Nebraska, USA

PostPosted: Wed Jul 16, 2014 2:28 pm    Post subject: Reply with quote

Smarty is agnostic, it does not parse/discard any chars in a template file. If you want BOM stripped by Smarty, make a simple prefilter.
Back to top
View user's profile Send private message Visit poster's website
U.Tews
Administrator


Joined: 22 Nov 2006
Posts: 5067
Location: Hamburg / Germany

PostPosted: Wed Jul 16, 2014 6:38 pm    Post subject: Reply with quote

This discussion poped up once in a while. We decided now that Smarty does remove the BOM automatically.

The Update is now in the SVN trunk and will later be included in 3.1.20
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Smarty Forum Index -> Bugs All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP