473,386 Members | 1,873 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,386 software developers and data experts.

Another ASCII Formatting Question


Been struggling with find the correct ESC sequence for this.

A telnet session is established using Win XP DOS prompt.

I have provided a custom telnet screen - not the Server 2003
telnet. I am taking control of the port 23 session using the basic
API tools available to me in .NET.

I want the session to have a BLUE background and either white
or red letters (or, some white, some red).

Anybody out there know what the correct sequence is and, how
do I maintain the session's "blueness" until the connection is
dropped? Details appreciated.

Thanks!
Peter
Jan 23 '08 #1
13 1247
On Jan 23, 4:09 pm, pbd22 <dush...@gmail.comwrote:
Been struggling with find the correct ESC sequence for this.

A telnet session is established using Win XP DOS prompt.
Is this the default Windows telnet client? What terminal type is being
used?

Jon
Jan 23 '08 #2
no. this is just MS DOS with:

C:\telnet 172.33.2.30

connecting to the custom telnet server.

I am pretty sure this is VT 100 but don't
know how to check. If any of this sounds wrong,
maybe you could tell me?

Thanks.
Peter

Jan 23 '08 #3
On Jan 23, 4:46 pm, pbd22 <dush...@gmail.comwrote:
no. this is just MS DOS with:

C:\telnet 172.33.2.30

connecting to the custom telnet server.

I am pretty sure this is VT 100 but don't
know how to check. If any of this sounds wrong,
maybe you could tell me?
On my XP box, by default I've got ansi as the preferred terminal type.
To check, just type "telnet" and then from the prompt, enter "d" (on
its own) and see what the "Preferred term type" is. Of course, you can
do terminal negotiation in your server if you want...

Jon
Jan 23 '08 #4
yeah, that is what I am doing.
There is no "d" unless I program a "d" and give it logic.
All the terminal negotiation is happening from the program
I wrote on the server. Not sure if this helps you answer your
"preferred type" question.

If I am doing the terminal negotiation, how do I change
the color/font?

Peter
Jan 23 '08 #5
Sorry, i thought you meant once the connection was established.
The preferred TERM type is ANSI.
Jan 23 '08 #6
if it is not telnet "d", how would i find that out?

Jan 23 '08 #7

"you should only be accepting the terminal types you're willing to
support."

With all due respect, this really isn't helping me provide you with
an answer. I am new to telnet programming. Would you mind being
more clear as to "how I can check this". In other words, what, in my
program, should I be looking at to tell you what terminal types I
accept?

Thanks again for your help.
Peter
Jan 23 '08 #8
OK.
That doesnt work.
It was my understanding that the \u replaces the ESC
in my particular case - outputting strings using the networkstream.
If I put ESC[P beforehand and P after I get

ESC[P\u002CP
or
\uESC[P002CP

or whatever

I want the first line to the client to be the
condition for the color blue and i want that to persist throughout
the session. Since we established that I am using ANSI and that
44 is BLUE (2CP in HEX), would you mind simply showing me
what this command would be?
Jan 23 '08 #9
that is, 2C in HEX
Jan 23 '08 #10
"\u001B[P44m"
This is just giving me "44m" on the telnet client.

Jan 23 '08 #11
On Jan 23, 6:00 pm, pbd22 <dush...@gmail.comwrote:
"\u001B[P44m"

This is just giving me "44m" on the telnet client.
OK, got it.

\u001b[44m does the job.

Thanks for your help.
Peter
Jan 23 '08 #12
Good job by the pepole helping you... didnt think there where any
vt100 experts left...
//CY
Jan 26 '08 #13
if you know what to search on (which i did not).
Jan 27 '08 #14

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

Similar topics

4
by: DBQueen | last post by:
I have a subform which is in Continuous Forms view. I have added a button to the bottom of the page to move to the next record using the button wizard (result: DoCmd.GoToRecord , , acNext). I...
2
by: Martín Marconcini | last post by:
Hello there, I'm writting (or trying to) a Console Application in C#. I has to be console. I remember back in the old days of Cobol (Unisys), Clipper and even Basic, I used to use a program...
2
by: Dennis | last post by:
Looking for a method to programmatically convert (using vB) a Word doc to it's ASCII equivalent. I understand I'll lose all formatting, and that's okay Anyone out there have ideas Thaks ...
13
by: jcrouse | last post by:
Here is some of my code Dim myXmlTextWriter As XmlTextWriter = New XmlTextWriter("C:\CPViewer\CPViewer.xml", System.Text.Encoding.Unicode myXmlTextWriter.Formatting =...
18
by: Ger | last post by:
I have not been able to find a simple, straight forward Unicode to ASCII string conversion function in VB.Net. Is that because such a function does not exists or do I overlook it? I found...
4
by: Ryan | last post by:
I've got a little bit of code that runs when you enter data in a datasheet view (which is a subform of the form you are in) if rst!DateReceived >= 30 Then Forms!DisposalRecords.Label90.Caption =...
399
by: =?UTF-8?B?Ik1hcnRpbiB2LiBMw7Z3aXMi?= | last post by:
PEP 1 specifies that PEP authors need to collect feedback from the community. As the author of PEP 3131, I'd like to encourage comments to the PEP included below, either here (comp.lang.python), or...
9
by: =?Utf-8?B?RGFu?= | last post by:
I have the following code section that I thought would strip out all the non-ascii characters from a string after decoding it. Unfortunately the non-ascii characters are still in the string....
44
by: Pilcrow | last post by:
Is there a way that a proram can detect whether it is operating in an ASCII or an EBCDIC environment?
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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,...
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...

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.