Solved

DOS ASCII vs WINDOWS ASCII

Posted on 2004-09-07
6
767 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
Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

 
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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
groupSum6 challenge 6 86
groovy example issue 10 97
Advice on Xojo as a development tool over VB. 4 53
How to parse the string and split the sub directory names in asp.net 7 38
I know it’s not a new topic to discuss and it has lots of online contents already available over the net. But Then I thought it would be useful to this site’s visitors and can have online repository on vim most commonly used commands. This post h…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
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 …

813 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

15 Experts available now in Live!

Get 1:1 Help Now