I'm trying to find out how many bytes of data a PORTION of an email is taking up (not the whole email). How can I find this out?
Maybe there's something in a text editor like notepad++ that could tell me?
|
I'm trying to find out how many bytes of data a PORTION of an email is taking up (not the whole email). How can I find this out? Maybe there's something in a text editor like notepad++ that could tell me? |
||||
|
Drag the message from your email client to the desktop and open the resulting file (probably |
|||
|
|
|
To get a good estimate, one thing you can do is copy and paste the text to a .txt file and then read the resulting file size. I've written an AutoHotkey script to make it a little easier. Press Win+C to have a little popup message display the file size of the selected text.
Meta: my answer above is about |
||||
|
|
|
If you are sending your email as plain text then the number of bytes will be roughly equal to the number of characters in the selected text. If you paste the text into Microsoft Word it will be able to do a letter count for you to help. If you are sending your email as Rich Text or HTML then there is no easy formula. In general the longer and the more complicated the formatting of the text is, the larger it will be in bytes. If it really matters that you reduce the size of your email, always use plain text encoding. |
|||
|
|
|
Each character in the plain text should be equal to 1 byte. So 512 characters would be 0.5KB; 1024 characters would be 1KB and so forth. For example, this sample e-mail would be 308 bytes:
Edit: To clarify, "one character" refers to the raw source of the e-mail message, not the formatted representation shown by most e-mail clients. The original question refers specifically to plain text and to Notepad++ (which has ANSI as its default encoding) so I assumed that the message would be encoded as plain ANSI. |
|||||||||||||||||
|
|
Notepad++ does this. Simply copy & paste the part of the message you want to size up into a new tab and read the length off the length field in the status bar at the bottom: If you set the encoding to match your email client (Encoding menu -> UTF-8), it will count Unicode characters correctly (for example, ☃ is 3 bytes long in UTF-8 encoding). This will only apply to plain-text emails, not to HTML or multipart/alternative emails.
|
|||
|
|
wc- does it not? – Ingmar Hupp Feb 23 '12 at 21:01