NetTalk Central

NetTalk Web Server => Web Server - Ask For Help => Topic started by: Alberto on August 05, 2016, 01:52:00 PM

Title: Problem with Net:f:xxx.html
Post by: Alberto on August 05, 2016, 01:52:00 PM
Hi im adding html code in a NetWebPage with :

Code: [Select]
do Header
packet.append(p_web.BodyOnLoad(p_web.Combine(p_web.site.bodyclass,),,p_web.Combine(p_web.site.bodydivclass,)))

        packet.Append('<!-- Net:f:RofecFullBody.html -->')
        do SendPacket

do Footer

This file begins with :

Code: [Select]
<script>window.mtzMarketData
verified with many text readers but when appended it appears as:

Code: [Select]
<script>window.mtzMarketData
adding those 

NT8

Any idea to solve it?
Thanks
Title: Re: Problem with Net:f:xxx.html
Post by: Bruce on August 11, 2016, 12:21:41 AM
>> verified with many text readers

those characters are specifically there for text readers to read, and hence you don't see them. (If you use a hex reader you'll see they are in the file.)
They are known as the "Byte Order Mark" (commonly called the BOM) and they tell the editor that the file is unicode - in this case utf-8.

I have tweaked the next build to remove the BOM from files loaded using the F: tag. If you are still using NT8 though you need to edit the text file itself, and save it without the BOM (most editors allow you to do this.)

cheers
Bruce