Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3679014
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T03:24:33+00:00 2026-05-19T03:24:33+00:00

there are strange characters at the beginning of a file I’m editing (using textmate..)

  • 0

there are strange characters at the beginning of a file I’m editing (using textmate..)
I don’t know when they appeared, they’re invisible in textmate but my script that reads the file goes crazy..

this is the first few chars in the file (as seen with od command):

0000000 177377 000120 000105 000117 000120 000114 000105 000072

the first 2 shouldn’t be there I think.. maybe they were caused by some strange dropbox sync? Or something else.. but they tend to reappear (I don’t yet know when..)

My question: what is that 177377 and a simple way to remove it in my ruby script?
thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T03:24:34+00:00Added an answer on May 19, 2026 at 3:24 am

    The 000000 177377 (hex 0x0000FEFF) is a byte-order mark (BOM). It indicates to consumers that the remainder of the file is in big-endian UTF-32 encoding. This may not be correct in your case, but that’s what the bytes indicate.

    What to do with it is a little tricky. In general, the BOM does accurately represent the encoding of the following data. Detecting and skipping it and treating the subsequent content as if it were in your local default charset is usually going to be the wrong thing to do, even though it seems to be correct here. Instead, I’d try to figure out why your editor is inserting an incorrect BOM and whether there’s a way to disable it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using XOM to canonicalize some XML. But there are some strange characters
I noticed a strange behaviour of File.Copy() in .NET 3.5SP1. I don't know if
i try to send my datas to php with ajax but there's strange mistake.
There is some strange behaviour in parsing KML produced by Google Earth using a
I am trying to read and parse a file line by line, but there
I have noticed that there are strange requests to my website trying to find
There is a strange bug in ListView/GridView in WPF when the SelectionMode is set
There's a strange requirement where I need to get server side data on page
I promise you I am not lying. There is one strange line in this
I've faced a bit strange problem. There is a site client would like to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.