Solved

Getting  at the start of a text file created by VB6

Posted on 2009-05-14
1
374 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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

746 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now