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

  • Home
  • SEARCH
  • 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 4549716
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T16:23:55+00:00 2026-05-21T16:23:55+00:00

I am trying to add a text file to my project. Not that it

  • 0

I am trying to add a text file to my project. Not that it is important but I am using these text files to store SQL statements. My project reads the SQL statement then uses it to gather data.

I use the right-click context menu from the project explorer to ‘Add a new item’, then select text file from the menu, change the file name and click the ‘Add’ button.

A blank template is displayed and no matter what I type, and save, when I read the file I get 3 garbage characters at the beginning of the file. You cannot see them in the editor but if you view the file in a hex editor you can see them.

Before you ask, no, it is not my read routine that is creating the characters as I used an external edit to view the file and they’re there. I think Visual Studio is putting them there.

Here is what the text looks like in a HEX editor:

SELECT …etc..

^^^
Which doesn’t bode well for my SQL statement.

Any thoughts?

  • 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-21T16:23:56+00:00Added an answer on May 21, 2026 at 4:23 pm

    They’re just a UTF-8 byte order mark. They’re three bytes, but a single character.

    Whether they’re a problem for you will depend on how your project reads the file. IIRC, StreamReader will read and strip it, so you should be okay.

    When you save the file, you can go to “File / Advanced Save Options” and select an encoding of

    Unicode (UTF-8 without signature)

    to avoid the BOM. It would probably be best to just change your code to cope though.

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

Sidebar

Related Questions

i am trying to add text to a div sectionj using jquery but the
I am trying add two columns in a text file that are seperated by
I am trying to read a text file using the code (pasted below), but
I 'm trying to add text on a specific image. Its working perfectly but
I am trying to add full text search capabilities to my RoR app, but
I'm trying to add some HTML formatted text to Word using Office Interop. My
I have a text file that I am reading in python . I'm trying
I am trying to add a line to a text file with Java. When
I am trying to add a text file to a zip archive through a
I am trying to read a text file in C# and add line numbers

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.