Solved

DOS ASCII vs WINDOWS ASCII

Posted on 2004-09-07
6
765 Views
Last Modified: 2013-12-03
Is there a difference between the DOS and WINDOWS ASCII code page.

If yes which characters are different?

What is the difference between ANSI and ASCII sets???
0
Comment
Question by:Idarac
6 Comments
 
LVL 3

Assisted Solution

by:Validor
Validor earned 250 total points
ID: 11997990
DOS ASCII is the same as Windows ASCII.  Windows can use many encodings, most are multi-byte character sets and are often called UNICODE character sets.  ASCII is about the only one that is not a multi-byte character encoding and it is the same as the DOS encoding.  Mind you, if you view a DOS file with this encoding, the FONT will probably not reflect the same characters that you would see in DOS.  It is still the same data, though.

ASCII typically refers to the lower 7-bits, or 128 characters of the DOS character set.  ANSI usually refers to the whole 256-character set.  The lower 128 characters or the ANSI set are the ASCII character set.
0
 
LVL 23

Expert Comment

by:brettmjohnson
ID: 11998121
The 8-bit character sets have 255 possible unique values to represent characters.
The code pages provide a mapping between each of the 255 unique values and
a glyph representing a character.  Unfortunately 255 values is insufficient to encode
all of the character gyphs in Roman character-based languages, let alone glyphs of
non-Roman languages of Africa , the Middle-east, and Asia.   IBM created localized
character mappings that provided mappings for most glyphs used in the local languages.
http://www.microsoft.com/globaldev/reference/oslocversion.mspx

The US ANSI X3.4-1986 specifies the character mapping for characters 0-127
http://www.columbia.edu/kermit/csettables.html

The other code pages usually differ from ANSI set by specifying additional mappings
for character codes 128-255.

[US] MS-DOS ASCII is code page 437, and later code page 850.
[US] Microsoft ASCII is code page 1252

0
 
LVL 19

Expert Comment

by:RanjeetRain
ID: 11998195
>> Is there a difference between the DOS and WINDOWS ASCII code page.
Code page and the character set are two different things. The code page for the two are different, but character sets are the same.

>> If yes which characters are different?
None.

>> What is the difference between ANSI and ASCII sets???
ANSI is a superset of ASCII and vice versa.

ASCII is a 7 bit character set. Means it has a total of 128 characters. First 27 charatcers are referred to as control characters, as they are used to control many operations in some prominent leagcy OSs, DOS and UNIX for instance. For exampls, under MS-DOS, ASCII character 26 (a <Ctrl + Z> key sequence), is treated as a E-O-F character. ASCII character 7 (a <Ctrl + G> key sequence), sends a beep to the system speaker, character 27 is the <Escape> key.

Many of characters were used in OSs like UNIX in a certain way. While Windows retains the behaviour of the ASCII character set as it is, it does work more comfortably with ANSI, and UNICODE in later versions.

Mind you, an OS CANNOT change a character set, it can only use it differently. Also, what code page a particular character set belongs to, has no significance other than how the OS itself will loacte it.

0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 3

Expert Comment

by:Validor
ID: 11998814
Update to my previous comment...

I was responding under the impression that you were referring to the character set under the DOS operating system, not the DOS ASCII codepage in Windows.  Some of the other responses may be more correct in this respect.
0
 
LVL 1

Author Comment

by:Idarac
ID: 11999336
Maybe I should ask what exactly is a code page as opposed to the character set and how do each work?
0
 
LVL 19

Accepted Solution

by:
RanjeetRain earned 250 total points
ID: 11999548
I will *try* to explain.

Character set - A character set is a set of symbols a software uses to interact with a human user. More technically, a character set defines what a representation of a particular string of bits will be, on the I/O devices. A character set is a defined collection of symbols.

Code page - A code page is a location (in the main memory owned by the OS) where the definition of a character set is located. An OS may have more than one code pages, each one to support the characters people around the globe are more used to. For instance, an English user doesn't use accented vowels. A French or Spanish user may. Hence, the need of different code pages.

A code page is, probably, called so because, it is a memory page that holds the definition of a character set and its representation.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Does the idea of dealing with bits scare or confuse you? Does it seem like a waste of time in an age where we all have terabytes of storage? If so, you're missing out on one of the core tools in every professional programmer's toolbox. Learn how to …
Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

932 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now