OutFront Forums
     Home    Register     Search      Help      Login    

Follow Us
On Facebook
On Twitter
RSS
Via Email

Recent Posts
Todays Posts
Most Active posts
Posts since last visit
My Recent Posts
Mark posts read

Sponsors
Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.
Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.
Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

 

Funny characters in my page?

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> General Web Development >> Funny characters in my page?
Page: [1]
 
jaybee

 

Posts: 14320
Joined: 10/7/2003
From: Berkshire, UK
Status: offline

 
Funny characters in my page? - 3/12/2007 16:54:54   
I'm putting this here as the fix specifically relates to Expression Web, the problem however exists in many other editors and it drives me bonkers.

If you suddenly find you see



usually at the beginning or end of your page
or
you've loaded a php or css file that refuses to work and when you download it and have a look, those 3 nasty little characters have managed to stick themselves on the front or back

It's to do with character encoding and is known as a BOM or Byte Order Mark. Normally this will only appear if you've set your page encoding to utf-8 or greater which is the encoding recommended these days. However, many browsers don't know what to do with it so responsible editors give you the option to encode as utf-8 but turn off the BOM on the front.

The ideal scenario except, all the big guys have forgotten to provide that option. Worse, once you've set one page up in Expressions using utf-8, even if you then go back to Windows encoding, the BOM just sits there and refuses to budge. And worse! Expressions understands the BOM so doesn't display it, you only know it's there when things go horribly wrong on the web.

Coffee Cup Editor, the developers admit they forgot to put the switch off option in but say they'll add it to the next version.

Another team, for a well known editor I shan't name openly, didn't have a clue what I was talking about even when presented with the evidence.

Microsoft were suspiciously quiet on the whole issue and then one of the MVPs found the problem. I could kiss him.

It's in the blank page template! :) So if you do File>New and set yourself up a cascading style sheet, or a text file, there's a hidden BOM lurking and just waiting to get you.

Here's how to turn the darn thing off.

http://www.95isalive.com/expression/index.html


_____________________________

If it ain't broke..... fix it until it is.
:)

:)
GAWDS
Now where did I put that Doctype?
RickP

 

Posts: 715
Joined: 11/13/2004
From: Kent, U.K.
Status: offline

 
RE: Funny characters in my page? - 3/14/2007 10:55:41   
Hi Jaybee

That's useful info following our chat about this problem a while ago. I'll give it a go - however, this problem has also occurred for me on pages imported from previous FP sites too - not taken from the EW template files!

I'll join you in one of these: :)

Also... the BOM has been appearing on pages using "charset=windows-1252"
The particular pages are using a php include - do you think MS don't like PHP being used in Expressions!? :)

_____________________________

Regards, Rick
On-The-Web-Now!

(in reply to jaybee)
jaybee

 

Posts: 14320
Joined: 10/7/2003
From: Berkshire, UK
Status: offline

 
RE: Funny characters in my page? - 3/14/2007 11:57:23   
quote:

Also... the BOM has been appearing on pages using "charset=windows-1252"
The particular pages are using a php include - do you think MS don't like PHP being used in Expressions!? :)


If you set up a new page using EW, doesn't seem to matter what encoding you use, the BOM is in the template. Making the change above seems to fix it.

Files created that got the BOM stuck on the front keep it there. You have to open the page in notepad, delete the characters then save it. Doesn't always work though as notepad seems to be in cahoots. If it doesn't work, try Unired a freebie plain text editor that's not Microsoft.

MS have admitted php has been crippled in EW.

_____________________________

If it ain't broke..... fix it until it is.
:)

:)
GAWDS
Now where did I put that Doctype?

(in reply to RickP)
jaybee

 

Posts: 14320
Joined: 10/7/2003
From: Berkshire, UK
Status: offline

 
RE: Funny characters in my page? - 3/15/2007 11:04:12   
Well further testing revealed that the above fix works if you're using utf-8 but anything else still get the BOM added.

I have a number of include files that I call with a PHP statement, every single one had the BOM on the front. I got rid of it but the instant I opened it up in EW again, back it came. There are workarounds all over the web for the various different combinations of these things.

The recommendation for php included files is to add this at the top of each one

<?php /* ?>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<?php */ ?> 


I haven't tried it yet as this seems to be completely and utterly ridiculous.

_____________________________

If it ain't broke..... fix it until it is.
:)

:)
GAWDS
Now where did I put that Doctype?

(in reply to jaybee)
jaybee

 

Posts: 14320
Joined: 10/7/2003
From: Berkshire, UK
Status: offline

 
RE: Funny characters in my page? - 3/15/2007 11:08:24   
Right, having read through loads of screaming posts on various fora it seems that MS are saying it's to do with files that don't have a <meta> with encoding at the top. EW treats these as incomplete html files and adds the BOM to compensate. This is making an otherwise useful tool pretty unusable and from what I've read MS have no intention of doing anything about it. If that's true then I'll be dropping it.


< Message edited by jaybee -- 3/15/2007 11:39:11 >


_____________________________

If it ain't broke..... fix it until it is.
:)

:)
GAWDS
Now where did I put that Doctype?

(in reply to jaybee)
Tailslide

 

Posts: 6691
Joined: 5/10/2005
From: Out here on the raggedy edge
Status: offline

 
RE: Funny characters in my page? - 3/15/2007 11:14:16   
Soooo let me get this straight... They're forcing people to use UTF-8 whether they want to or not OR use a M$ proprietory encoding?

B*ll*cks to that.

I thought EW was supposed to give it's users more choice not less.

_____________________________

Little Blue Plane Web Design | Land Rover project

:)

(in reply to jaybee)
jaybee

 

Posts: 14320
Joined: 10/7/2003
From: Berkshire, UK
Status: offline

 
RE: Funny characters in my page? - 3/15/2007 11:40:24   
The MS support guy I just spoke to said
quote:

No, it doesn't support PHP you should learn ASP instead.
My reply is unprintable. He's probably now applying an ice pack to his ear.


_____________________________

If it ain't broke..... fix it until it is.
:)

:)
GAWDS
Now where did I put that Doctype?

(in reply to Tailslide)
womble

 

Posts: 5972
Joined: 3/14/2005
From: Living on the edge
Status: offline

 
RE: Funny characters in my page? - 3/15/2007 12:10:31   

quote:

ORIGINAL: Tailslide
B*ll*cks to that.

Couldn't have put it better myself.

_____________________________

~~ "A cruel god ain't no god at all" ~~
~~ Erase hate. Practice love. ~~

(in reply to Tailslide)
jaybee

 

Posts: 14320
Joined: 10/7/2003
From: Berkshire, UK
Status: offline

 
RE: Funny characters in my page? - 3/15/2007 12:35:25   
OK to summarise all of this:

You need to change the NORMAL.HTM file and the BLKTXT.TXT files as noted above in order to fix the bug in Expression Web.

If you use includes the page should take the encoding from the main page UNLESS you are using php includes in which case it will stick a BOM on the front no matter what you do. The only way round it is to add a meta tag, in a comment, into your include files so the server fixes the encoding but the tag gets ignored by the validators.

I think. :)

(this however doesn't explain why it's doing it with my css files as well.) (I give up)

_____________________________

If it ain't broke..... fix it until it is.
:)

:)
GAWDS
Now where did I put that Doctype?

(in reply to womble)
jaybee

 

Posts: 14320
Joined: 10/7/2003
From: Berkshire, UK
Status: offline

 
RE: Funny characters in my page? - 3/16/2007 10:46:43   
I've found a way round the php problems.

You can use EW to work with it but after you have finished and saved the file.......
Get yourself a copy of the freebie editor UniRed.
Open the file in that and do File>Save As>.
In the file types it will be set to UTF-8 (BOM) choose UTF-8 and save.

You can then upload and you're good to go. Why they can't offer that as an option in EW Lord only knows, not hard is it.

_____________________________

If it ain't broke..... fix it until it is.
:)

:)
GAWDS
Now where did I put that Doctype?

(in reply to jaybee)
The_magus

 

Posts: 44
Joined: 9/1/2006
Status: offline

 
RE: Funny characters in my page? - 4/10/2007 2:43:04   
Dear Jaybee:

Just followed your suggestion/instruction about using Unired on a xxx.pl file and noticed when I attemped "save as" the default setting was not UTF-8 (BOM) but UTF-8 but I saved it as that in hopes that it would solve the problem.

It did not!

This error is appearing in the top left corner of my forum page which was created by yaBB and probably is a result of something I messed up but would sure like to get rid of it.

Could it be in one of the "include" pages???

Cheers
Jack
The Magus

(in reply to jaybee)
jaybee

 

Posts: 14320
Joined: 10/7/2003
From: Berkshire, UK
Status: offline

 
RE: Funny characters in my page? - 4/10/2007 4:52:03   
Jack, absolutely. I get it in the includes and in the css. Basically anything that doesn't have meta tags at the top. Open your includes in Unired, save them as UTF-8 no BOM and you should be fine.

I've now got so paranoid about this I won't open anything other that full html pages in EW.

_____________________________

If it ain't broke..... fix it until it is.
:)

:)
GAWDS
Now where did I put that Doctype?

(in reply to The_magus)
spanner

 

Posts: 7
Joined: 8/13/2007
Status: offline

 
RE: Funny characters in my page? - 8/13/2007 20:37:38   
Thanks for that great help!!

I have just started playing with EW as well and found my CSS sheet didn't work, talk about frustrating.

I use topstyle lite - a fantastic free CSS editor, that picked up the little code.

For php I use PHP Designer 2007 which is also free and very good.

(in reply to jaybee)
cdwise

 

Posts: 4
Joined: 6/16/2005
From: Houston, TX
Status: offline

 
RE: Funny characters in my page? - 8/30/2007 16:42:37   
BOM is the default in Expression Web for UTF-8 and sadly there is no good way to change it in this version. There are things you can do such as usine ISO-8859-1 (my preference) or for php pages that are used as includes you can create an entry for "inc" or some other extension that Expression Web doesn't recognize as a web page and then you will get the option to right click. cjppse encoding and choose not to add the BOM. (Note, you can do this with any css file.)

Many people use inc for their php includes that don't contain connection or password information anyway. Other workarounds include adding a characterset delaration in your included files whether php, asp or otherwise.

There is more information on Characterset and BOM along witha link to a macro to remove the BOM in all your files at http://by-expression.com/tutorials/characterset/ the article includes a screenshot of the encoding box mentioned above.

FWIW, the next version of Expression Web will have native support for PHP and the BOM issue should also go away since PHP doesn't support BOM (which is arguably a problem with PHP since using a BOM is recommended on UTF-8 encoded websites according to the standards body.)

(in reply to jaybee)
Page:   [1]

All Forums >> Web Development >> General Web Development >> Funny characters in my page?
Page: [1]
Jump to: 1





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts