Web Hosting Forum | Lunarpages


*
Welcome, Guest. Please login or register.
Did you miss your activation email?



Login with username, password and session length
May 24, 2012, 02:29:33 AM

Pages: 1 [2]   Go Down
  Print  
Author Topic: How to edit page titles  (Read 2280 times)
MrPhil
Senior Moderator
Berserker Poster
*****
Offline Offline

Posts: 5212



« Reply #15 on: August 01, 2010, 11:40:47 AM »

You and/or your developer used a brain-dead editor (probably from Microsoft) that "helpfully" inserts the UTF-8 BOM on files edited under UTF-8 (even if the file contains only ASCII characters). The BOM is absolutely unnecessary and can be safely removed. Do you think some of your page content is stored in the database? If a BOM is stored in there, it could be difficult to edit it out, especially if you can't even see it! Do you need to have UTF-8, rather than Latin-1 encoding? Who is your audience, and what languages will they be using? Anyway, if you do want to keep UTF-8 pages and database, you need to figure out how to display and edit files and database entries in Latin-1 or CP-1252. That is necessary to see the BOM and get rid of it. I seem to recall that there might be a tool floating around on the SMF forum (simplemachines.org's file_check.php) that checks and repairs files, and among other things, gets rid of BOMs (I think). You also need to find whose editor is adding the BOM in the first place (if it comes back after removing it), and either switch to another editor (Notepad++ has a switch to save a file without BOM), or learn how to configure that one not to add BOMs. Maybe you can download your files (such as about.php) to a different PC that uses CP-1252 or the like, see and edit out the BOMs there, and upload back to the server. As for BOMs in the database, maybe you can bring up the CMS editor or phpMyAdmin, manually switch the display character encoding in the browser (View > Character Encoding) to Western Latin-1 or Windows-1252 or whatever, see and remove the BOM, switch back to UTF-8, and save it. You'll have to do some experimenting, as I'm not at your PC, but something along those lines should eventually work.
Logged

Visit My Site

E-mail Me
  
-= From the ashes shall rise a sooty tern =-
Tsuchiyama
Intergalactic Cowboy
*****
Offline Offline

Posts: 60


WWW
« Reply #16 on: August 03, 2010, 09:59:54 AM »

Thanks again, Mr. Phil.  BOM is now removed from the about.php file and site navigation now working OK.   Something I changed in editing the page titles must have caused the BOM to cause the error.

The tip on Notepad ++ using the Encode in UTF-8 without BOM was the breakthrough I needed.

I didn't do any of the setup coding on the site.  All I've done in the past is just add content through the CMS.   The developer used Macs, so I don't know how the BOM thing crept in, but he seemed to struggle with the project.

The character set allows translation corrections from Japanese language to English language in the AUCTION section.  I'm not keen to get too deep into the coding - in case I mess something up.   I'll get someone to revamp the AUCTION section which needs some updates because of changes to the Yahoo! Japan Auction which it draws content from.   

The only other thing that would be nice would be able to fully edit the page titles on
http://www.ts-export.com/page.php?page=about
http://www.ts-export.com/page.php?page=about_export_centre
http://www.ts-export.com/page.php?page=about_vehicles
http://www.ts-export.com/page.php?page=about_parts
http://www.ts-export.com/page.php?page=about_others
http://www.ts-export.com/page.php?page=about_fees

I've been able to edit the bit that says "TS EXPORT"  but just can't edit the bits that say "About Vehicles", "About Parts" etc. into something that matches the page content and is better for SEO.   This seems to be the tricky bit.

title><?php echo ucwords(str_replace("_", " ", $_GET['page'])); ?> | TS EXPORT</title>

If its too hard to do I'm happy to let it go. 

Interestingly there is an "A" favicon that displays in Chrome (displays automatically - I didn't add it) on the HOME and ABOUT pages, but not on the other pages. 

Again, so much for your help and patience.  You've given great support.
Logged

Pages: 1 [2]   Go Up
  Print  
 
Jump to: