Forums / Setup & design / Strange characters generated by ezpublish

Strange characters generated by ezpublish

Author Message

Kuba Boguslawski

Monday 26 February 2007 2:24:42 pm

Hello

I have changed few templates. Ez generates very strange characters before modified templates - "". Does anybody know what can be wrong? I am using EditPlus

Thanks
Jakub

Claudia Kosny

Tuesday 27 February 2007 12:20:20 am

Hi there

Most likely your editor saves the templates with a BOM (just google it). Found this on the web regarding editplus:

... but it could have something to do with
the Byte Order Mark (BOM). Most web pages don't use the BOM because it
can cause display problems in some browsers. You may want to check to
see that "Support UTF-8 files without Byte Order Mark" checked in the
preferences under "Files".

source: http://tech.groups.yahoo.com/group/editplus/message/4574

Claudia

*- pike

Friday 20 April 2007 3:26:14 pm

yes, "" is the BOM.

http://en.wikipedia.org/wiki/Byte_Order_Mark

...looks like this in a HEX editor:
EF BB BF

There is something with Textpad5 and the BOM,
though I dont really understand what :-)
http://www.textpad.com/support/relnotes.html

I'm fighting with BBEdit and the BOM.
It is outputted whenever I do a

    $bla = $tpl->fetch('bla.tpl');

Note, the character is *outputted* when I do the fetch, even though the result of the fetch is stored in a variable ...

when I change bla.tpl's encodings, things do change (but I can't get rid of the BOM). I only get different BOMs (UTF-16, etc)

hmmmmmmmm
*-pike

---------------
The class eZContentObjectTreeNode does.

Piotrek Karaś

Friday 20 April 2007 11:41:49 pm

Although BOM has it's uses, I've never seen in welcome in web/PHP encoded applications (utf-8 encodings). Always avoid it at all costs, and that can be done by choosing editors which handle it in a controlled way (either remove it altogether or simply keep it only if had been there before). It used to be a problem to find those editors some years ago, but I guess not so much anymore. As stated in the Wiki article, many Windows editors, including notepad, prepend it automatically when they assume a file is UTF-8 encoded.

Another way to remove unnecessary BOMs is to write a simple (PHP) script that searches for it in the application files recursively and removes it, if found. It's a good idea to store the pattern of BOM in an empty UTF-8 file (it will have 3 bytes). Just backup your application beforehand :)

--
Company: mediaSELF Sp. z o.o., http://www.mediaself.pl
eZ references: http://ez.no/partners/worldwide_partners/mediaself
eZ certified developer: http://ez.no/certification/verify/272585
eZ blog: http://ez.ryba.eu

florian bellenger

Monday 09 March 2009 3:56:08 pm

hello everybody

Sometimes, when cache is not used, web pages are broken (with ie7). When it happens, there is a BOM at the beginning of the HTML source of the page. I have checked the templates, their format is ANSI.

Maybe there is a file I have forgot to check wich contains the BOM. Is there an other possible explanation ?

(I finally found some files with the BOM.)

eZ debug

Timing: Jan 18 2025 11:34:23
Script start
Timing: Jan 18 2025 11:34:23
Module start 'content'
Timing: Jan 18 2025 11:34:23
Module end 'content'
Timing: Jan 18 2025 11:34:23
Script end

Main resources:

Total runtime0.8284 sec
Peak memory usage4,096.0000 KB
Database Queries206

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0066 588.9766180.8125
Module start 'content' 0.00660.6698 769.7891669.7344
Module end 'content' 0.67650.1518 1,439.5234337.0547
Script end 0.8283  1,776.5781 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00390.4688210.0002
Check MTime0.00140.1675210.0001
Mysql Total
Database connection0.00070.085410.0007
Mysqli_queries0.749190.42992060.0036
Looping result0.00230.27252040.0000
Template Total0.798196.320.3991
Template load0.00220.268520.0011
Template processing0.795896.068320.3979
Template load and register function0.00020.029710.0002
states
state_id_array0.00120.139710.0012
state_identifier_array0.00090.108520.0004
Override
Cache load0.00190.2305370.0001
Sytem overhead
Fetch class attribute can translate value0.00170.207060.0003
Fetch class attribute name0.00160.195560.0003
XML
Image XML parsing0.00130.160660.0002
class_abstraction
Instantiating content class attribute0.00000.001960.0000
General
dbfile0.00200.2397280.0001
String conversion0.00000.000830.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
5content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
12content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
5content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
2content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 27
 Number of unique templates used: 7

Time used to render debug report: 0.0002 secs