Click here to Skip to main content
16,014,392 members
Home / Discussions / C#
   

C#

 
GeneralRe: Deploying C# Application? Pin
kasturirawat13-Mar-02 12:59
kasturirawat13-Mar-02 12:59 
AnswerRe: Deploying C# Application? Pin
James T. Johnson13-Mar-02 18:19
James T. Johnson13-Mar-02 18:19 
GeneralC# Documentation Tool Pin
13-Mar-02 9:09
suss13-Mar-02 9:09 
GeneralMemory usage API in C# Pin
Ollie13-Mar-02 7:28
Ollie13-Mar-02 7:28 
GeneralRe: Memory usage API in C# Pin
Ollie15-Mar-02 6:58
Ollie15-Mar-02 6:58 
GeneralRe: Memory usage API in C# Pin
ez215-Mar-02 7:23
ez215-Mar-02 7:23 
GeneralOEM / IBM-PC8 font Pin
Dale Thompson13-Mar-02 2:38
Dale Thompson13-Mar-02 2:38 
GeneralRe: OEM / IBM-PC8 font Pin
Dale Thompson3-Apr-02 7:09
Dale Thompson3-Apr-02 7:09 
Dale Thompson wrote:
I'm trying to select a font that will display the original 8-bit OEM/IBM-PC8 font (with all the line characters, etc).

Here is the font I'm using:

System.Drawing.Font( "Lucinda Console",
10.2F,
System.Drawing.FontStyle.Bold,
System.Drawing.GraphicsUnit.Point,
( ( System.Byte )( 255 ) ) );

I've tried both 0 (ANSI) and 255 (OEM) for the last argument.

The text buffers go through a few Encoding.ASCII.GetString() calls too.



If anyone is interested, I found (guessed) the answer to this question.

Unrelated to the problem - my code snippet had an error, it is "Lucida Console" (not Lucinda).

But the key to the problem has to do with the "Encoding.ASCII.GetString()" calls

The provided ASCII encoding only support 7 bit ASCII. This is where the translation from 16 bit Unicode to what is displayed happens - anything that is 128 or above isn't supported by the supplied ASCII encoding.

The trick is to use the right codepage for the encoding. In this case, after a little research, I found that I needed to use the old IBM Codepage 437!

So - using "Encoding.GetEncoding( 437 ).GetString()" corrects the problem and displays
PC graphics characters!

Hope this info is of use to someone out there! Smile | :)

Dale Thompson
GeneralC#'s xsd don't work! Pin
13-Mar-02 2:00
suss13-Mar-02 2:00 
GeneralRe: C#'s xsd don't work! Pin
13-Mar-02 2:04
suss13-Mar-02 2:04 
GeneralRe: C#'s xsd don't work! Pin
13-Mar-02 2:10
suss13-Mar-02 2:10 
GeneralCOM Interop Pin
12-Mar-02 13:03
suss12-Mar-02 13:03 
GeneralP4W Pin
12-Mar-02 4:02
suss12-Mar-02 4:02 
General.Net Book Store Pin
12-Mar-02 2:46
suss12-Mar-02 2:46 
GeneralCalling method on other form dynamically Pin
11-Mar-02 22:58
suss11-Mar-02 22:58 
GeneralWeb Services Pin
Dave Sharp11-Mar-02 2:12
Dave Sharp11-Mar-02 2:12 
GeneralRe: Web Services Pin
Paul Hutchinson11-Mar-02 5:59
Paul Hutchinson11-Mar-02 5:59 
Generalhelp about clipboard Pin
Hesham Amin10-Mar-02 6:05
Hesham Amin10-Mar-02 6:05 
GeneralRe: help about clipboard Pin
Domenic Denicola10-Mar-02 9:24
Domenic Denicola10-Mar-02 9:24 
GeneralRe: help about clipboard Pin
James T. Johnson10-Mar-02 9:50
James T. Johnson10-Mar-02 9:50 
GeneralRe: help about clipboard Pin
Domenic Denicola10-Mar-02 13:11
Domenic Denicola10-Mar-02 13:11 
GeneralRe: help about clipboard Pin
Hesham Amin11-Mar-02 21:46
Hesham Amin11-Mar-02 21:46 
General.NET Collections Pin
9-Mar-02 15:49
suss9-Mar-02 15:49 
GeneralRe: .NET Collections Pin
James T. Johnson9-Mar-02 20:46
James T. Johnson9-Mar-02 20:46 
GeneralRe: .NET Collections Pin
mohn331010-Mar-02 7:11
mohn331010-Mar-02 7:11 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.