0

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
  • There is no conversion step to ASCII. The text you type is ASCII (or Unicode/UTF-x). ASCII allows the computer to give meaning to the binary and display the right character to you.
    – mtak
    Feb 13 '18 at 11:31
  • “When we type something is that computer takes it in binary or ASCII?” Everything you type on a computer is binary, it might be using ASCII encoding, but it’s still binary
    – Ramhound
    Feb 13 '18 at 12:12
  • So, as per my conclusion, When we type an email, it will first generate the corresponding ASCII. Suppose, the ASCII value is 56. After generating ASCII,the corresponding binary value is created. From here , by using BASE64 A encoding, this will be again converted into 4 bits of 6 segments. That is 2^7. Is this happens?
    – Ben Druno
    Feb 13 '18 at 15:43
  • What is the role of Base 64 in this image?. Image attached! drive.google.com/file/d/1OTvL5X9WEQmjxIH8KHeYIGHVXjFL04Io/…
    – Ben Druno
    Feb 13 '18 at 16:16
  • I don't understand:-( What BASE64 is doing in above image ? Or is BASE64 is an encoding like ASCII? Can we have BASE64 rather than ASCII?
    – Ben Druno
    Feb 13 '18 at 16:22
2

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.

0

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
  • So, as per my conclusion, When we type an email, it will first generate the corresponding ASCII. Suppose, the ASCII value is 56. After generating ASCII,the corresponding binary value is created. From here , by using BASE64 A encoding, this will be again converted into 4 bits of 6 segments. That is 2^7. Is this happens?
    – Ben Druno
    Feb 13 '18 at 15:10
  • @BenDruno, for pure ASCII text, it is sent as is. For binary data, it is converted by base64 encoding. Base64 uses 64 different ASCII characters, so 6 bits of binary data are encoded in each byte transferred. Feb 13 '18 at 15:55
  • You are saying from ASCII,BASE64 is used to convert to binary?
    – Ben Druno
    Feb 13 '18 at 15:59
  • No, base64 is a method to take arbitrary binary data (values 0-255) and express them as printable ASCII (32-126) to make them safe for transport in an email. Feb 13 '18 at 16:02
  • What is the role of Base 64 in this image?. Image attached! drive.google.com/file/d/1OTvL5X9WEQmjxIH8KHeYIGHVXjFL04Io/…
    – Ben Druno
    Feb 13 '18 at 16:11

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.