473,804 Members | 3,433 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 9362
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******@hotmai l.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*****@nowher e.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******@hotma il.com> wrote in message
news:c2******** *************** ***@posting.goo gle.com...
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*****@Intell igenCIA.com> wrote in message news:<4x******* **********@nwrd ny02.gnilink.ne t>...
"Justin Carter" <VB******@hotma il.com> wrote in message
news:c2******** *************** ***@posting.goo gle.com...
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
5868
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 open with oracle but am just curious if anyone has seen this before. Thanks Rich $ ldd hsodbc /usr/lib/libc.2 => /usr/lib/libc.2
0
1692
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: _STL::_Node_Alloc_Lock<(bool)1, (int)0>::_S_lock Besides this error, the following warnings are given: ld: 0711-224 WARNING: Duplicate symbol: _STL::money_get<char,
18
10521
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 close the STRONG tag the same way, my text appears in bold. No problem. When I do the same things with the corresponding HTML tags (&lt; , &gt; ) the tag is not interpreted, it is simply displayed: <STRONG>text</STRONG>
9
13281
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 <hash_map>//from Standard template library //and some other headers
1
4635
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 com.sun.j3d.utils.geometry.*; import javax.media.j3d.*; import javax.vecmath.*;
2
5337
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: 1>make_buildinfo.obj : error LNK2019: unresolved external symbol __imp__RegQueryValueExA@24 referenced in function _make_buildinfo2 Ask on python-list@python.org . - Josiah
6
121922
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 not help me. Does any body know what is the problem?. Thanks. OtherFunctions.obj : error LNK2001: unresolved external symbol "int
0
2708
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 doesnt exist or something similiar to that. explanation on microsoft.com its not an oracle specific problem.
3
3194
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 symbol : class device location: class devtestdrive device d1=new tv(); ^ devtestdrive.java:5: cannot resolve symbol symbol : class tv
0
9706
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9579
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10575
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10330
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10319
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10076
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6851
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5651
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4297
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.