Smarty Forum Index Smarty
The discussions here are for Smarty, a template engine for the PHP programming language.
Dedicated server web hosting provided by Guru-host.eu.
[SOLVED] characters getting added to output

 
Post new topic   Reply to topic    Smarty Forum Index -> General
View previous topic :: View next topic  
Author Message
akitaben
Smarty n00b


Joined: 12 May 2012
Posts: 2

PostPosted: Sat May 12, 2012 11:37 pm    Post subject: [SOLVED] characters getting added to output Reply with quote

There is a problem where Smarty is injecting what seem to be unicode characters into the output. This is messing up my pages. I've verified that all my php and tpl files are encoded using iso-8859-1. I definately don't have any unicode or multibyte characters in my code. I found them by using firebug plugin and also see them coming across in a packet capture.

It seems to occur around {include file=x} and at the top of any page I call $smarty->display()

here are some examples of what I'm seeing in starbug the boxes below are (ampersand, pound, six, five, two, seven, nine, semi-colon)

Code:

<html>
    <head><title>my title</title></head>
    <body>
    𐋧𐋧𐋧
    This is my content
    </body>
</html>


Before I go digging into the smarty code, doe anyone have any ideas?[/code]


Last edited by akitaben on Sun May 13, 2012 3:39 am; edited 1 time in total
Back to top
View user's profile Send private message
akitaben
Smarty n00b


Joined: 12 May 2012
Posts: 2

PostPosted: Sun May 13, 2012 3:38 am    Post subject: SOLVED Reply with quote

I solved it. Turns out a few of the files had UTF-8 encoding, not UTF-8 without BOM.


http://stackoverflow.com/questions/6538203/how-to-avoid-echoing-character-65279-in-php-this-question-also-relates-to-java
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Smarty Forum Index -> General 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