Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Byte-Order Mark found in UTF-8 File

sjeepssjeeps
edited April 2007 in Vanilla 1.0 Help
Hi, When using W3.org html validator to test my site page, I get this error: <code> Byte-Order Mark found in UTF-8 File. The Unicode Byte-Order Mark (BOM) in UTF-8 encoded files is known to cause problems for some text editors and older browsers. You may want to consider avoiding its use until it is better supported.</code> I've downloaded Notepad2 and used it to see where's the error is but I couldn't find any! And when viewing the source code using iwebtools source code viewer I see this: <code><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-us"> <head> </code> Any thoughts? Thanks.

Comments

  • Simply delete the "garbage" characters using a text editor.
    If they don't show up in Notepad2 just hit forward delete 4 times after <code>
    I sometimes get this in PHP or JavaScript code, usually caused by typing option-characters on a Mac or hitting delete with the option-key or control-key held down.

    Posted: Tuesday, 17 April 2007 at 4:32PM

  • I'll try that but I've also found something in the sql dump and I'm not sure if it's right: -- phpMyAdmin SQL Dump -- version 2.9.0.2 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Apr 17, 2007 at 06:43 AM -- Server version: 4.1.21 -- PHP Version: 4.4.2 -- -- Database: `xxx_xxx` -- CREATE DATABASE `xxx_xxx` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci; USE `xxx_xxx`; As you can see, the default character set is "latin1 COLLATE latin1_swedish_ci" and also my cpanel show that the php version is 4.4.5 not like the sql dump says which is 4.4.2 Does this make any sense?! Thanks.
  • Sorry Wanderer, I'm not sure when can find that "" any where or even "If they don't show up in Notepad2 just hit forward delete 4 times after <code>" ! :(
  • edited April 2007
    Are you running Vanilla 1.0.3? There was a bug relating to a BOM that has been fixed in 1.1.2: Attachments download problem # 1
  • No, I'm running Vanilla 1.1.2 on PHP 4.4.5 according to my cpanel.
  • Quote: sjeeps
    pic I'm not sure when can find that "" any where or even "If they don't show up in Notepad2 pic
    I know you can't see them in Notepad2 but you said you could see them using iwebtools source code viewer?

    So you know where they are, so keep forward deleting until a character you can see disappears, then put it back.

    Posted: Tuesday, 17 April 2007 at 5:14PM

  • Max_BMax_B New
    edited April 2007
    @sjeeps: the sql header you posted shows that your forum is either in "weird" or in "worst" state, according to my own definition in this memo. This may or not be related to your current problem but it's worth looking at it
  • @sjeeps
    Are you using any language file?
    If it's BOM, it only exists in PHP file. When you save *utf8* file with some editor(like windows notepad), it will add a BOM on the file header.
    Almost all editor can't view it, but it can be removed with some editor.
    Since I haven't viewed the html source file, I can't confirm it.
    // You can check the html source header with hex code viewer, the BOM is 0xFE 0xBB 0xBF on the file header.
  • sjeepssjeeps
    edited April 2007
    @Max_B I'm not sure what do you mean by my forum setting is either "weird" or in the "worst" state, I'm running a new Vanilla 1.1.2 installation which I've never used before and I'd like to know what would you suggest. Should I just install it all over and keep my few members database? @SkyBoy Yes I'm using a language file in conf/langauge.php, do you this is what causing this character "" to show up? Thanks. btw, where can I get the hex code viewer?
  • *SOLVED* After hours wasted on finding where is that "garbage " character and how to delete it, I alomst went through every PHP file within Vanilla installation, I took a back up of the database and searched every line of it and even added this line to the conf/settings.php: <code>$Configuration['DATABASE_CHARACTER_ENCODING'] = 'utf8';</code> But all that didn't help finding that "" shit!!! So I ended up doing another Vanilla installation w/out any extensions and everything seemed fine but once I started adding some extensions, I realized that the "Private Message" extension was causing the problem! I was editing the PHP files in that extension using Notepad2 and by default or somehow the files was saved as "UTF-8 with Signature" :( , so I changed it to "UTF-8" and guess what? Stupid me! :) Sorry to bother you guys, thanks.
This discussion has been closed.