title: For HTTP responses with Content-Types suggesting character data, which charset should be assumed by the client if none is specified?
body: <p>If no charset parameter is specified in the Content-Type header, <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html" rel="noreferrer">RFC2616 section 3.7.1</a> seems to imply ISO8859-1 should be assumed for media types of subtype &quot;text&quot;:</p>
  <blockquote>
  <p>When no explicit charset parameter is
  provided by the sender, media subtypes
  of the &quot;text&quot; type are defined to have
  a default charset value of
  &quot;ISO-8859-1&quot; when received via HTTP.</p>
  <p>Data in character sets other than
  &quot;ISO-8859-1&quot; or its subsets MUST be
  labeled with an appropriate charset
  value.</p>
  </blockquote>
  <p>However, I routinely see applications that serve up Javascript files with Content-Type values like &quot;application/x-javascript&quot; (i.e. no charset param), even when these scripts contain non-ASCII UTF-8 characters, which would be corrupt if interpreted as ISO8859-1.</p>
  <p>This does not seem to pose problems to clients. How do clients know to interpret the bytes as UTF-8? Is there a rule for other character-data subtypes that implies UTF-8 should be the default? Where is this documented?</p>