Get rid of BOM from utf-8

Discussion in 'Programming' started by opportunist86, Sep 13, 2011.

  1. #1
    Following error was detected on my site
    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.

    how to resolve?
     
    opportunist86, Sep 13, 2011 IP
  2. drhowarddrfine

    drhowarddrfine Peon

    Messages:
    5,428
    Likes Received:
    95
    Best Answers:
    7
    Trophy Points:
    0
    #2
    Look in your editor preferences for removing the auto insertion of the BOM.
     
    drhowarddrfine, Sep 13, 2011 IP
  3. Rukbat

    Rukbat Well-Known Member

    Messages:
    2,908
    Likes Received:
    37
    Best Answers:
    51
    Trophy Points:
    125
    #3
    That's the same as a "Question Mark found in Your File."

    You don't put the character into the file if it's going to cause a problem.

    The UTF-8 BOM is 0xEF,0xBB,0xBF. A text editor will display it as . Since BOM has no meaning in UTF-8, the Unicode Standard doesn't recommend inserting it into UTF-8 test. (It only serves to identify the text as being UTF-8.)

    If it's in a file, just delete it.
     
    Rukbat, Sep 13, 2011 IP
  4. opportunist86

    opportunist86 Active Member

    Messages:
    422
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    55
    #4
    i cant get you. I'm newbie and need easy guidance!
     
    opportunist86, Sep 13, 2011 IP
  5. Rukbat

    Rukbat Well-Known Member

    Messages:
    2,908
    Likes Received:
    37
    Best Answers:
    51
    Trophy Points:
    125
    #5
    Open the file that's causing the problem (it's text) and delete the BOM the same way you'd delete any other character.
     
    Rukbat, Sep 13, 2011 IP