Thanks for answering!

  • Thread starter Thread starter nly
  • Start date Start date
N

nly

Thak you all for answering me the question: "What's the purpose of 'Base64
encoding and decoding'?"

Peter said: "Strings can contain characters that can interfere with
processes. Characters such as those below ASC(32) and the extended
characters..."

I am still not sure why we need to convert bytes into ASCII, or why
non-ASCII bytes will interfere the processing of data stream. Could you
please clarify this further? Thanks in advance!
 
nly said:
Thak you all for answering me the question: "What's the purpose of 'Base64
encoding and decoding'?"

Peter said: "Strings can contain characters that can interfere with
processes. Characters such as those below ASC(32) and the extended
characters..."

I am still not sure why we need to convert bytes into ASCII, or why
non-ASCII bytes will interfere the processing of data stream. Could you
please clarify this further? Thanks in advance!

When you are dealing with ascii based protocols, binary data doesn't always
fit in all that well. Things like email or newsgroups, which are text based,
have adapted over time to support binary data. Base64 is one method of
encoding that.

Now, the reason why is varied. Some of it is that some older programs are
only able to handle the ASCII character set, some of it is because the spec
explicitly limits the character set, therefore "correct" implementations
don't handle the extraneous bytes, including the servers. The various
encodings used to handle multibyte character sets probably has a little to
do with it as well.
 
nly said:
Thak you all for answering me the question: "What's the purpose of 'Base64
encoding and decoding'?"

Peter said: "Strings can contain characters that can interfere with
processes. Characters such as those below ASC(32) and the extended
characters..."

I am still not sure why we need to convert bytes into ASCII, or why
non-ASCII bytes will interfere the processing of data stream. Could you
please clarify this further? Thanks in advance!

a data stream and an ASCII stream have something very fundamental in
common: they both consist of bits of information.

Some of the ASCII characters (below char 32 and above 127) are used in
stream control, and some are used in file control and various other
functions that a text stream shouldn't do.

Therefore, those characters are encoded, so that they do not interfere
with any of the transport or storage processes a data stream might go
through. The non-textual characters (like CR, LF, FF, etc.) in ASCII
are converted into textual characters so that they are safe in emails,
for example.
 
nly said:
Thak you all for answering me the question: "What's the purpose of 'Base64
encoding and decoding'?"

Peter said: "Strings can contain characters that can interfere with
processes. Characters such as those below ASC(32) and the extended
characters..."

I am still not sure why we need to convert bytes into ASCII, or why
non-ASCII bytes will interfere the processing of data stream. Could you
please clarify this further? Thanks in advance!

A better answer would be:

Binary data is not necessarily valid character data in any encoding.
Even if it happens to be valid character data, it may contain things
like accenting characters which text processing may decide to convert
on the fly.

Base64 converts *any* binary data to a text form which is guaranteed to
be ASCII. ASCII does not contain any combining characters, there's no
risk of running into surrogate pairs, and ASCII is probably the most
widely transportable character encoding in the world.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top