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.)

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 31 2025 01:25:16
Script start
Timing: Jan 31 2025 01:25:16
Module start 'layout'
Timing: Jan 31 2025 01:25:16
Module start 'content'
Timing: Jan 31 2025 01:25:16
Module end 'content'
Timing: Jan 31 2025 01:25:16
Script end

Main resources:

Total runtime0.7330 sec
Peak memory usage8,192.0000 KB
Database Queries69

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0056 588.2656151.2266
Module start 'layout' 0.00560.0039 739.4922220.7188
Module start 'content' 0.00950.7226 960.21094,572.1016
Module end 'content' 0.73210.0009 5,532.312511.8125
Script end 0.7330  5,544.1250 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00380.5227160.0002
Check MTime0.00140.1881160.0001
Mysql Total
Database connection0.00070.090210.0007
Mysqli_queries0.640387.3446690.0093
Looping result0.00080.1091670.0000
Template Total0.684093.320.3420
Template load0.00200.272020.0010
Template processing0.682093.032320.3410
Template load and register function0.00160.212910.0016
states
state_id_array0.00100.138110.0010
state_identifier_array0.00160.221920.0008
Override
Cache load0.00170.2344370.0000
Sytem overhead
Fetch class attribute can translate value0.00200.277650.0004
Fetch class attribute name0.00230.314460.0004
XML
Image XML parsing0.00120.157150.0002
class_abstraction
Instantiating content class attribute0.00000.001960.0000
General
dbfile0.00180.2388170.0001
String conversion0.00000.001440.0000
Note: percentages do not add up to 100% because some accumulators overlap

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
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 27
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs