News for hackers. Stuff that matters.
Re:Termination of StartCom business by justinjlynn on Sunday December 03, 2017 @08:59AM (#15837581)
Amusing that they couldn't get the encoding correct on their final email either.
Re:Termination of StartCom business by LukeShu on Sunday December 03, 2017 @09:58AM (#15837793)
In the email I received, it's a non-ASCII apostrophe encoded in UTF-8. The email headers say "Content-Type: text/html; charset=iso-8859-1", but then the HTML body says "<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>". Clients that give preference to the header will get it wrong.

The full raw email: https://lukeshu.com/dump/startcom-email.txt

Re:Termination of StartCom business by justinjlynn on Sunday December 03, 2017 @10:23AM (#15837937)
eh, the header should match the body encoding regardless of meta tag; should it not?
Re:Termination of StartCom business by LukeShu on Sunday December 03, 2017 @10:51AM (#15838052)
Yes, the header should match the body encoding, but it doesn't necessarily have to; that is in part what the <meta http-equiv> tag is for; it may be interpreted as saying "the value of header is potentially wrong, use this value instead" (of course, the thing says "http-equiv", and in an email, it isn't an HTTP header, it is a MIME header!)

In HTML4/XHTML1, the <meta http-equiv> isn't meant to be interpreted by the user agent; the HTTP server is supposed to parse it and set the the HTTP header accordingly.

Of course, the people writing the (X)HTML probably have a better idea of what encoding they're using than the people configuring the HTTP server, so it's common for user agents to allow <meta http-equiv> to override the actual header, as it allows more things to work "correctly" for users. But, strictly speaking, that is non-conforming.

In (X)HTML5, that practice was codified, and the <meta http-equiv> tag is given preference over the actual headers (for a whitelist of allowed headers).

So, which interpretation is "correct" depends on if it is HTML4/XHTML1 or (X)HTML5.

Now, the MIME type of the email body said "text/html" which can be anything, and the body used the HTML5 doctype, but specified the XHTML1 xmlns. I'm honestly not sure which interpretation is correct in that case.

Re:Termination of StartCom business by cratermoon on Sunday December 03, 2017 @10:56AM (#15838080)
ISO-8859-1, aka "Latin 1" is a single-byte encoding but it represents the Unicode codepoints 0-127 (ASCII) in exactly the same way as UTF-8. This is a legacy of Microsoft Windows.
Re:Termination of StartCom business by bound008 on Sunday December 03, 2017 @10:31AM (#15837978)
This is more common than you think.
Re:Termination of StartCom business by nneonneo on Sunday December 03, 2017 @09:37AM (#15837692)
It’s correct in the email I received. It’s a non-ascii apostrophe so I guess certain mail clients might not handle it correctly?
Re:Termination of StartCom business by nvr219 on Sunday December 03, 2017 @05:29PM (#15840030)
I copied and pasted from Outlook... probably Outlook's fault honestly.