Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>In C, a <code>char</code> is a type of integer, and it's most typically one byte wide. One byte is 8 bits so that's 2 to the power 8, or 256, possible values (as noted in another answer).</p> <p>In other languages, a 'character' is a completely different thing from an integer (as it should be), and has to be explicitly encoded to turn it into a byte. Java, for example, makes this relatively simple by storing characters internally in a UTF-16 encoding (forgive me some details), so they take up 16 bits, but that's just implementation detail. Different encodings such as UTF-8 mean that a character, when encoded for transmission, could occupy anything from one to four bytes.</p> <p>Thus your question is slighly malformed (which is to say it's actually several distinct questions in one).</p> <p>How many values can a byte have? 256.</p> <p>What characters can be sent in emails? Mostly those ASCII characters from space (32) to tilde (126).</p> <p>What bytes can be sent over the internet? Any you like, as long as you encode them for transmission.</p> <p>What can be cut-and-pasted? If your platform can do Unicode, then all of unicode; if not, not.</p> <p>Does UTF-8 make a difference? UTF-8 is a standard way of encoding a string of characters into a string of bytes, and probably not much to do with your question (Joel Spolsky has a <em>very</em> good account of <a href="http://www.joelonsoftware.com/articles/Unicode.html" rel="nofollow noreferrer">The Absolute Minimum Every Software Developer Absolutely, Positively Must Know About Unicode and Character Sets (No Excuses!)</a>).</p> <p>So pick a question!</p> <p><strong>Edit, following edit to question</strong> Aha! If the question is: 'how do I encode data in such a way that it can be mailed?', then the answer is probably 'Use <a href="http://en.wikipedia.org/wiki/Base64" rel="nofollow noreferrer">base64</a>'. That is, if you have some purely binary format for your levels, then base64 is the 'standard' (very much quotes-standard) way of encoding that binary blob in a way that will make it through mail. The things you want to google for are 'serialization' and 'deserialization'. Base64 is probably close to the practical maximum of information-per-mailable-character.</p> <p>(Another answer is 'use XML', but the question seems to imply some preference for compactness, and that a basically binary format is desirable).</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload