|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Output Ascii 0x02 as part of recordFormat of the text: Text must be in the format as you would like it to appear without embedded newline characters. Instead of newline characters, use ASCII character 0x02. A blank like would be represented by two 0x02 characters in a row. I am having a hard time figuring out how to output this. i have tried a few things such as Dim twoAsbyte As Byte = &H2 my output has a "2" wherever i put it instead of an unprintable character. So the text would look like: This is a lineone0x02this is line two0x020x02this is line 4 where 0x02 would really display unprintable characters Thanx Hello LLcoolQ,
> characters, use ASCII character 0x02. A blank like would be this is not an ASCII text, but a binary as every character with a value > represented by two 0x02 characters in a row. less than 32 (space) is unprintable. Therefore, you might want to write the file in binary mode. You can (like in traditional VB) use the "Open" command or to use the BinaryWriter class ("How to: Read and Write to a Newly Created Data File " gives you an example how to do it). Best regards, Martin thanx, thats what i figured.
wanted to avoid doing that Show quoteHide quote > Hello LLcoolQ, > >> characters, use ASCII character 0x02. A blank like would be >> represented by two 0x02 characters in a row. >> > this is not an ASCII text, but a binary as every character with a > value less than 32 (space) is unprintable. Therefore, you might want > to write the file in binary mode. > > You can (like in traditional VB) use the "Open" command or to use the > BinaryWriter class ("How to: Read and Write to a Newly Created Data > File " gives you an example how to do it). > > Best regards, > > Martin > Hi,
All characters below decimal 127 (&H7F) are ASCII. You do not need to do anything special with them. In VB 0x02 is Chr(2). -- Richard Grier, MVP Hard & Software Author of Visual Basic Programmer's Guide to Serial Communications, Fourth Edition, ISBN 1-890422-28-2 (391 pages, includes CD-ROM). July 2004, Revised March 2006. See www.hardandsoftware.net for details and contact information. >I am having a hard time figuring out how to output this. Try using ChrW(2)Mattias -- Mattias Sjögren [C# MVP] mattias @ mvps.org http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com Please reply only to the newsgroup. will give it a try in the morning, thanx
Show quoteHide quote >> I am having a hard time figuring out how to output this. >> > Try using ChrW(2) > > Mattias > On May 2, 5:54 pm, Mattias Sjögren <mattias.dont.want.s***@mvps.org>
wrote: > >I am having a hard time figuring out how to output this. That was it, thanx much> > Try using ChrW(2) > > Mattias > > -- > Mattias Sjögren [C# MVP] mattias @ mvps.orghttp://www.msjogren.net/dotnet/|http://www.dotnetinterop.com > Please reply only to the newsgroup. recordOut.Append(arrValues(0)) recordOut.Append(ChrW(2)) Hi,
All characters below decimal 127 (&H7F) are ASCII. You do not need to do anything special with them. In VB 0x02 is Chr(2). Example: Dim STX As String = Chr(2) STX is the ASCII character called StartOfText. This character is used by some systems as a marker to indicate the start of a text string. Another common character is ETX (Chr(3)) EndOfText, which might be used to indicate the end of a string. These characters do not print, but they still are ASCII text characters and may be used as part of a String variable. Dick -- Richard Grier, MVP Hard & Software Author of Visual Basic Programmer's Guide to Serial Communications, Fourth Edition, ISBN 1-890422-28-2 (391 pages, includes CD-ROM). July 2004, Revised March 2006. See www.hardandsoftware.net for details and contact information.
Add custom button on title bar
Deleting blanks in a string Threading(?) & FileSystemWatcher fax question Sending Mail Show Msgbox in SYSTEM account How to create generic object at run-time? adding xml data to a combobox Help.ShowPopup for all Textboxes on Form? Would like to see the Generated code in visual studio 2005 |
|||||||||||||||||||||||