Solved

Getting  at the start of a text file created by VB6

Posted on 2009-05-14
1
385 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
1 Comment
 
LVL 11

Accepted Solution

by:
Antagony1960 earned 500 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

ScreenConnect 6.0 Free Trial

Check out the updates in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI that improves session organization and overall user experience. See the enhancements for yourself!

Question has a verified solution.

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

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
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…

777 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