Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 629491
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T19:45:07+00:00 2026-05-13T19:45:07+00:00

If no charset parameter is specified in the Content-Type header, RFC2616 section 3.7.1 seems

  • 0

If no charset parameter is specified in the Content-Type header, RFC2616 section 3.7.1 seems to imply ISO8859-1 should be assumed for media types of subtype "text":

When no explicit charset parameter is
provided by the sender, media subtypes
of the "text" type are defined to have
a default charset value of
"ISO-8859-1" when received via HTTP.

Data in character sets other than
"ISO-8859-1" or its subsets MUST be
labeled with an appropriate charset
value.

However, I routinely see applications that serve up Javascript files with Content-Type values like "application/x-javascript" (i.e. no charset param), even when these scripts contain non-ASCII UTF-8 characters, which would be corrupt if interpreted as ISO8859-1.

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?

  • 1 1 Answer
  • 1 View
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T19:45:07+00:00Added an answer on May 13, 2026 at 7:45 pm

    All major browsers I’ve checked (IE, FF and Opera) completely ignore the RFC specification in this part.

    If you are interested in the algorithm to auto-detect charset by data, look at Mozilla Firefox link.

    Just a small note about content types: Only text has character sets. It’s reasonable to assume that browsers handle application/x-javascript the same as they handle text/javascript ( except IE6, but that’s another subject ).

    Internet Explorer will use the default charset (probably stored at registry), as noted:

    By default, Internet Explorer uses the
    character set specified in the HTTP
    content type returned by the server to
    determine this translation. If this
    parameter is not given, Internet
    Explorer uses the character set
    specified by the meta element in the
    document. It uses the user’s
    preferences
    if no meta element is
    specified.

    Source: http://msdn.microsoft.com/en-us/library/ms537500%28VS.85%29.aspx

    Mozilla Firefox attempts to auto-detect the charset, as pointed here:

    This paper presents three types of auto-detection methods to determine encodings of documents without explicit charset declaration.

    Source: http://www.mozilla.org/projects/intl/UniversalCharsetDetection.html

    Opera uses auto-detection too, as documented:

    If the transport protocol provides an encoding name, that is used. If not, Opera will look at the page for a charset declaration. If this is missing, Opera will attempt to auto-detect the encoding, using the domain name to see if the script is a CJK script, and if so which one. Opera can also auto-detect UTF-8.

    Source: http://www.opera.com/docs/specs/opera9/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

There is a charset parameter in htmlspecialchars but the decode version does not have
Does anybody knows which charset is used in Moldava. We to prepare our software
how do i determine what a mysql db's charset is set to? in the
When you use DllImport to import a function you can specify a CharSet to
The current declaration of SendMessage over at PInvoke.net is: [DllImport(user32.dll, CharSet = CharSet.Auto, SetLastError
I received some text that is encoded, but I don't know what charset was
Hey, I've tried researching how to POST data from java, and nothing seems to
UPDATED See post #3 below. There is a need to upload a file to
Usually when I get POST data it's send from a HTML form and the
I am using the apache library. I have created a class which sends a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.