?
Solved

Getting  at the start of a text file created by VB6

Posted on 2009-05-14
1
Medium Priority
?
423 Views
Last Modified: 2012-05-07
Hi

I am creating a fixed width text file in VB6, and it works fine when i open the file and read it, snippet here:

ITEM_DOWNU

When i open the file in another VB6 app i've created, i get this:

ITEM_DOWNU

So because of those characters at the start, the fixed width is messed up

Why does it do this? is it some sort of encoding? how can i decode it properly?

Thanks

Scott
0
Comment
Question by:seancurt
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 11

Accepted Solution

by:
Antagony1960 earned 2000 total points
ID: 24390184
Those characters are the Byte Order Mark (BOM) signature characters created by saving a file with UTF-8 encoding. My guess is that you are either saving the file in VB as a text stream with UTF-8 encoding or subsequently editing it with with a text editor which is set to save in that format. Save the file with ANSI encoding to avoid the problem.
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses
Course of the Month12 days, left to enroll

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question