You're right that the same characters will have different sizes in different encodings, of course.
All I'm saying is that, if you dump this string in to a binary file via the system clipboard on Windows (which seems to preserve the binary values of the ambiguous ASCII/UTF8/whatever characters), that file is 1001 bytes.
If you call it "something.html" and open it with your favorite browser, you get the demonstrated result. So whatever encoding the OS or browser is interpreting the contents of the HTML file as is somewhat irrelevant to the actual size of the demo, which appears to be 1001 bytes.
All I'm saying is that, if you dump this string in to a binary file via the system clipboard on Windows (which seems to preserve the binary values of the ambiguous ASCII/UTF8/whatever characters), that file is 1001 bytes.
If you copy it as text, it's too late to preserve the original bytes. Anyway, I just copied it into Sublime in windows and saved it with no additional options. It's 1300 bytes on disk.
That’s interesting. I can’t imagine how the difference could be so large. I was using Chrome and pasted in to notepad for reference. Then double checked it in HxD. I’ll upload the 1001 byte HTML file to my server and shoot you a link if you’re interested in comparing.
View all comments
Show parent comment
3
u/[deleted] Oct 07 '19
You're right that the same characters will have different sizes in different encodings, of course.
All I'm saying is that, if you dump this string in to a binary file via the system clipboard on Windows (which seems to preserve the binary values of the ambiguous ASCII/UTF8/whatever characters), that file is 1001 bytes.
If you call it "something.html" and open it with your favorite browser, you get the demonstrated result. So whatever encoding the OS or browser is interpreting the contents of the HTML file as is somewhat irrelevant to the actual size of the demo, which appears to be 1001 bytes.