?
Solved

How do I encode numbers using OEM 437?

Posted on 2009-02-16
1
Medium Priority
?
479 Views
Last Modified: 2013-12-17
I am writing a file using the encoding code below...

It works fine when all of the data is a straight text string, but I am running into problems when numbers are involved.  For instance, the number 45 is treated as 4 and 5(the resulting output data is 3435), not fifty (should spit out the character "-" which is also 2D).  Any ideas as to what I am missing?  Thanks.
0
Comment
Question by:drunk_irishman
1 Comment
 
LVL 1

Accepted Solution

by:
drunk_irishman earned 0 total points
ID: 23662062
Figured it out, so for anyone else.....

wr.WriteLine((char)45);

That was the solution, I needed to cast the value as a char.
0

Featured Post

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A basic question.. “What is the Garbage Collector?” The usual answer given back: “Garbage collector is a background thread run by the CLR for freeing up the memory space used by the objects which are no longer used by the program.” I wondered …
More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…
Suggested Courses
Course of the Month15 days, 13 hours left to enroll

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question