Velvet Star Monitor

Standout celebrity highlights with iconic style.

general

A text is converting to ASCII or BINARY first?

Writer Matthew Harrington

When we type something in a text file or suppose that I'm sending an email to my friend with an attachment inside the email. In both cases of text file and email. What is happening first? Is that text/attachment converting to ASCII OR BINARY first? When we type something is that computer takes it in binary or ASCII?

5

2 Answers

ASCII is an character encoding. Encodings define how text is represented in binary.

The text may be converted to binary using ASCII, but most likely a modern encoding such as UTF-8 is used.

The SMTP protocol does not encode the size of the message in the protocol. The end of the message is reached when a single dot . is received on a line of its own. So, the protocol doesn't allow transmission of any data that contains a newline, a dot and another newline in sequence.

In practice, it is even more restricted, as several of the old mailer daemons did not handle non-ASCII characters well, so people used uuencode to turn binary data into ASCII. The base64 encoding is a more efficient variant of that, and this is what current mail clients use to prepare binary data that contains non-ASCII characters for transmission.

9

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy