| View previous topic :: View next topic |
| Author |
Message |
JerrySykes Newbie
Joined: 26 Feb 2006 Posts: 2 Location: Israel
|
Posted: Feb 26th, 2006 06:58 AM Post subject: Display ASCII characters (128 to 255) in a text/richtext con |
|
|
My project is a simple terminal VB6 program (based on the sample VBTerm).
I am using a RichTextBox to display received characters from a COM port.
The problem is with characters in the range 128 to 255.
They are not displayed as I'd expect.
I want these characters to be in codepage 437 (i.e. box drawing and block characters).
I have tried using Terminal and Arial Unicode MS fonts, I have even tried playing with
the \ansicpg control word, \'xx and \uN special characters.
I am competely lost !!
Any help would be most appreciated.
Thanks, VB newbie[/b] |
|
| Back to top |
|
RoofRabbit Regular

Joined: 06 Jul 2005 Posts: 95 Location: Lenoir, NC USA
|
Posted: Feb 26th, 2006 11:48 PM Post subject: |
|
|
Make sure your serial connection is for 8 bits and not 7 bits. The 7 bit connections won't give you anything above 127. _________________ Website - [link] |
|
| Back to top |
|
JerrySykes Newbie
Joined: 26 Feb 2006 Posts: 2 Location: Israel
|
Posted: Feb 27th, 2006 07:40 AM Post subject: |
|
|
I am using the RichTextBox so I can use a different font color for received text.
I also want to use the Terminal font.
The problem is the Terminal font is an OEM font and has no Unicode code points.
I think I'm fighting a loosing battle with this one.
Question: If I use a Unicode monospaced font like Lucida Console then all
I have to do is convert the bytes received into Unicode and let VB do the rest?
How can I do this conversion?
Incidently, if I change
\fcharset255 Terminal
in the RTF font table to
\fcharset254 Terminal
then I can see the chars 128 to 255 but in the Arial font
and not the Terminal font.
All this RTF header stuff is a nightmare.
Please help |
|
| Back to top |
|
|