The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

2 Pages V < 1 2  
Reply to this topicStart new topic
> Cannot Remove BOM
William Grimsley
post May 31 2017, 03:41 PM
Post #21


Novice
**

Group: Members
Posts: 26
Joined: 30-May 17
From: Newton Poppleford, Devon, UK
Member No.: 26,424



Well, it doesn't seem to. Any editors you can recommend?
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post May 31 2017, 04:17 PM
Post #22


.
********

Group: WDG Moderators
Posts: 9,650
Joined: 10-August 06
Member No.: 7



I've read https://notepad-plus-plus.org/ is good, but I havent' tried it.

http://www.textpad.com/ is good too, and what I use. It should at least let you remove a BOM.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
William Grimsley
post May 31 2017, 04:43 PM
Post #23


Novice
**

Group: Members
Posts: 26
Joined: 30-May 17
From: Newton Poppleford, Devon, UK
Member No.: 26,424



Been trying Notepad++ all along trying to fix this issue. I'll check out TextPad.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
William Grimsley
post May 31 2017, 04:48 PM
Post #24


Novice
**

Group: Members
Posts: 26
Joined: 30-May 17
From: Newton Poppleford, Devon, UK
Member No.: 26,424



Hmm, looks like I'm just going to have to put up with having a permanent BOM...

This post has been edited by William Grimsley: May 31 2017, 04:48 PM
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post May 31 2017, 05:27 PM
Post #25


.
********

Group: WDG Moderators
Posts: 9,650
Joined: 10-August 06
Member No.: 7



Strange, now I tried this:

1. Viewed source of the web page in TextPad, then saved the .html file to my desktop as UTF-8 with BOM unchecked in the save dialog. When I opened the saved file in TextPad again it still said UTF-8 (BOM).

2. Saved the desktop file a second time as UTF-8 with BOM unchecked. When I opened it again, it now said UTF-8 but this time without BOM.

Maybe there were two BOM characters in the file? wacko.gif
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Jun 1 2017, 02:03 AM
Post #26


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,730
Joined: 9-August 06
Member No.: 6



Have you identified the document with the BOM? Could you upload it here so we can see?
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
William Grimsley
post Jun 1 2017, 03:02 AM
Post #27


Novice
**

Group: Members
Posts: 26
Joined: 30-May 17
From: Newton Poppleford, Devon, UK
Member No.: 26,424



Christian, why did you save it as a .html file, when it's a .php file? This is what I currently have:

IPB Image

If I press "Save" there, I get one BOM, however if I select the "UNICODE BOM" box and then press "Save", I get two which are permanent even after pressing a button.

pandy, I uploaded the file a few posts back, but I've attached it again.

This post has been edited by William Grimsley: Jun 1 2017, 03:35 AM


Attached File(s)
Attached File  betel_readDayfile.php ( 71.49k ) Number of downloads: 114
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
William Grimsley
post Jun 1 2017, 04:37 AM
Post #28


Novice
**

Group: Members
Posts: 26
Joined: 30-May 17
From: Newton Poppleford, Devon, UK
Member No.: 26,424



OMG, I've fixed it! It was the included languages file that wasn't saved without BOM. Just like to say thanks for all the help, sorry that I forgot about that file. LOL.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Jun 1 2017, 05:26 AM
Post #29


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,730
Joined: 9-August 06
Member No.: 6



Sorry, I didn't see you already attached it.

Is this file included first thing inside div#tableData? If not, exactly where is it included?
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post Jun 1 2017, 07:26 AM
Post #30


.
********

Group: WDG Moderators
Posts: 9,650
Joined: 10-August 06
Member No.: 7



QUOTE(pandy @ Jun 1 2017, 12:26 PM) *

Sorry, I didn't see you already attached it.

I didn't see the attachment either before, but now it's there. unsure.gif

QUOTE
Is this file included first thing inside div#tableData? If not, exactly where is it included?

Yes, it seems basic.php includes betel_readDayfile.php exactly where you say, and betel_readDayfile.php in turn includes betel_dayfile_languages.php (but now the latter returns nothing).
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post Jun 1 2017, 07:29 AM
Post #31


.
********

Group: WDG Moderators
Posts: 9,650
Joined: 10-August 06
Member No.: 7



QUOTE(William Grimsley @ Jun 1 2017, 11:37 AM) *

OMG, I've fixed it! It was the included languages file that wasn't saved without BOM. Just like to say thanks for all the help, sorry that I forgot about that file. LOL.

You're welcome, I never even noticed that file. blush.gif

Note that files containing non-western characters are perhaps best saved as UTF-8 (without BOM) and not ANSI, otherwise the characters might become garbled.

QUOTE
Christian, why did you save it as a .html file, when it's a .php file?

I was just sloppy, but it shouldn't matter to the text editor.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Jun 2 2017, 02:18 AM
Post #32


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,730
Joined: 9-August 06
Member No.: 6



Then I don't think it's a BOM. I ran it through the WDG validator. It shows no funky characters, neither at the top nor anywhere else. Could it be produced by the PHP code and not inserted by an editor?

Anyway, I saved ithe document with an editor I know won't preserve any silly BOMs. To be extra safe I copied the text and pasted it in a new document. I don't think it will help in this case, but FWIW...

Attached File  betel_readDayfile_pandy.php ( 69.99k ) Number of downloads: 288
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post Jun 2 2017, 08:01 AM
Post #33


.
********

Group: WDG Moderators
Posts: 9,650
Joined: 10-August 06
Member No.: 7



QUOTE(pandy @ Jun 2 2017, 09:18 AM) *

Then I don't think it's a BOM.

In the included file betel_dayfile_languages.php it should be a BOM, but I haven't been able to check that file.

QUOTE
I ran it through the WDG validator. It shows no funky characters, neither at the top nor anywhere else.

True, TextPad says that the attached version of betel_readDayfile.php is UTF-8 without BOM, but the online version at http://newton-poppleford-weather.co.uk/betel_readDayfile.php used to be "UTF_8 (BOM)" (but now the OP has changed it to ANSI).

I think the file betel_dayfile_languages.php (which is only included into betel_readDayfile.php online) contained a BOM, but since that language file isn't included in the attached version of betel_readDayfile.php you won't get any BOM there. Clear as mud. happy.gif



User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Jun 2 2017, 11:57 AM
Post #34


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,730
Joined: 9-August 06
Member No.: 6



What is this? I didn't see the post about that it was fixed before, nor did I see Christian's reply to that. ninja.gif
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

2 Pages V < 1 2
Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 17th April 2024 - 09:02 PM