473,405 Members | 2,167 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

how to interpret the  symbol

Hi. I'm using VB6 and trying to read in a simple text file. I'm
using a statement similar to the following, which generally works
fine.

Input #Item, variable1, variable2, variable3, etc.

The problem is that one of the strings that is read in, variable2 in
the above example, is a square symbol, . An error is thrown, and I
can't find a way to work around it. (I'm stuck reading in that
symbol, i.e. I can't just change it in the text files, which would
solve the problem.)

I've tried using an ErrorHandler and Resume Next, but that symbol
seems to mess up the whole row of input, so I can't break up the above
statement into several Input statements and read the line variable by
variable using several Input statements like the following:
Input #Item variable1
Input #Item variable2
....

I don't know how VB interprets the  symbol, and so can't figure out a
way around it. I'd really appreciate any help. Thanks.

Justin
Jul 17 '05 #1
4 9345
The  symbol stands for anything that cannot normally be diplayed

You need to examine a file with something like a Hex Editor to find
out what it is.

Also better use Line Input and break the line yourself

On 12 Aug 2003 07:56:21 -0700, VB******@hotmail.com (Justin Carter)
wrote:
Hi. I'm using VB6 and trying to read in a simple text file. I'm
using a statement similar to the following, which generally works
fine.

Input #Item, variable1, variable2, variable3, etc.

The problem is that one of the strings that is read in, variable2 in
the above example, is a square symbol, . An error is thrown, and I
can't find a way to work around it. (I'm stuck reading in that
symbol, i.e. I can't just change it in the text files, which would
solve the problem.)

I've tried using an ErrorHandler and Resume Next, but that symbol
seems to mess up the whole row of input, so I can't break up the above
statement into several Input statements and read the line variable by
variable using several Input statements like the following:
Input #Item variable1
Input #Item variable2
...

I don't know how VB interprets the  symbol, and so can't figure out a
way around it. I'd really appreciate any help. Thanks.

Justin


Jul 17 '05 #2
I have a hex dump utility that would work nicely in this
situation. It's available from my download page at...

http://members.cox.net/poohbear1961/downloads.htm

"J French" <er*****@nowhere.com> wrote in message
You need to examine a file with something like a Hex Editor to find
out what it is.


Jul 17 '05 #3

"Justin Carter" <VB******@hotmail.com> wrote in message
news:c2**************************@posting.google.c om...
A follow-up, since I noticed the square symbol didn't show up - at
least when I look at it now. (It showed up in the preview before I
posted.) If you want to see the symbol I'm talking about, it's in
line 15 at the following site:
http://www.nrhatrc.org/r+d/cdd2.txt


Hi Justin..

Next time something like this happen, there is a quick easy trick. I do
debug <filename> and then do "D" for display memory. When I do that I get:

0B0A:0360 0A 22 43 4F 44 45 53 55-42 22 2C 31 35 2C 22 1A .CODESUB,15,.
0B0A:0370 22 2C 37 2C 22 44 22 2C-22 44 22 2C 37 30 34 2C ,7,D,D,704,

After the 15 and comma there is a hex "1A" or "26" decimal. This is the
right arrow symbol in terminal font, or the end of file marker, or Ctrl-Z.

Should not cause a problem, just read it with Line Input statement and get
it one character at a time.
Jul 17 '05 #4
Thanks to everyone for their help. I tried several of the
suggestions, and a combination of those plus one other change did the
trick. I used the hexdump utility referenced, also found that the
problem was "1A," and had planned to use a LOF (instead of EOF), use a
file pointer to get the last position before the 1A was read, and then
if the location was less than the LOF, go back and continue reading
until the position = LOF. However "Line Input" would not read past
that point. I found if I opened the file
For Binary As #Item
the problem was solved. It read the 1A symbol just fine. The
original code opened the file
For Input Access Read As #Item

So thanks again for the suggestions.
Justin

"Raoul Watson" <Wa*****@IntelligenCIA.com> wrote in message news:<4x*****************@nwrdny02.gnilink.net>...
"Justin Carter" <VB******@hotmail.com> wrote in message
news:c2**************************@posting.google.c om...
A follow-up, since I noticed the square symbol didn't show up - at
least when I look at it now. (It showed up in the preview before I
posted.) If you want to see the symbol I'm talking about, it's in
line 15 at the following site:
http://www.nrhatrc.org/r+d/cdd2.txt


Hi Justin..

Next time something like this happen, there is a quick easy trick. I do
debug <filename> and then do "D" for display memory. When I do that I get:

0B0A:0360 0A 22 43 4F 44 45 53 55-42 22 2C 31 35 2C 22 1A .CODESUB,15,.
0B0A:0370 22 2C 37 2C 22 44 22 2C-22 44 22 2C 37 30 34 2C ,7,D,D,704,

After the 15 and comma there is a hex "1A" or "26" decimal. This is the
right arrow symbol in terminal font, or the end of file marker, or Ctrl-Z.

Should not cause a problem, just read it with Line Input statement and get
it one character at a time.

Jul 17 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Richard | last post by:
I am setting up HS in 8i, when I go to $ORACLE_HOME/bin and do a ldd hsodbc i get the below error message, I have done a relink to recreate the hsodbc executable but still no luck. I do have a tar...
0
by: John Graat | last post by:
Hi all, I've built the STLport-462 library on AIX-4.3.3 using gcc-3.3.2. No errors during compilation. However, during linking the following error occurs: ld: 0711-317 ERROR: Undefined symbol:...
18
by: Robert Bowen | last post by:
Hello peeplez. I have an odd problem. When I put the ANSI symbol for "less than" ("<"), the word STRONG and then the ANSI symbol for "greater than" (">") in my web page, followed by some text, then...
9
by: Prasad | last post by:
HI, I am a beginner in VC++.. I am trying to write a Win32 console application in visual studio.. I am using following header files.. #include <STRING> using namespace std; #include...
1
by: vsp15584 | last post by:
Hii..i use the coding as below :- import java.applet.applet; import java.awt.*; import com.sun.j3d.utils.applet.mainframe; import com.sun.j3d.utils.universe.*; import...
2
by: f rom | last post by:
----- Forwarded Message ---- From: Josiah Carlson <jcarlson@uci.edu> To: f rom <etaoinbe@yahoo.com>; wxpython-users@lists.wxwidgets.org Sent: Monday, December 4, 2006 10:03:28 PM Subject: Re: ...
6
by: sadegh | last post by:
Hi I have a problem with my program in VC++6 When I compile it, the following errors are listed. I spend a lot of time on the groups.google.com to find its reason, but none of comments could...
0
by: Ryan Gaffuri | last post by:
hlink72@hotmail.com (Eric) wrote in message news:<ab8d8b14.0308220550.54fb5f22@posting.google.com>... LNK1120 is a standard C++ error. you using Visual C++? Means your references a class that...
3
by: Sindhu Rani | last post by:
i hav created 3 classes in 3 different files. am gettin an error durin compilation. wat shud i do??? C:\s\source>javac -d ..\classes devtestdrive.java devtestdrive.java:5: cannot resolve symbol...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.