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

  • SEARCH
  • Home
  • 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 7715499
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T02:24:04+00:00 2026-06-01T02:24:04+00:00

I have noticed stange things while performing tests. The stange things concern character encoding.

  • 0

I have noticed stange things while performing tests.
The “stange things” concern character encoding.

For each test I have loaded an HTML page in my Internet Explorer 9 web browser.
My HTML page is encoded in UTF-8.
Here is the code of my HTML page :

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<script type="text/javascript">
    var strChaine = "été";
    alert(strChaine.charCodeAt(0) +
            " " + strChaine.charCodeAt(1) +
            " " + strChaine.charCodeAt(2) +
            " " + strChaine.charCodeAt(3) +
            " " + strChaine.charCodeAt(4));
</script>
</head>
<body>

</body>
</html>

The HTML page contains JavaScript code to display an alert box.

Before each test I have set a specific coding in IE9 by right-clicking and then by selecting an option in the coding menu.

Test 1

For this test IE9 coding has been set to UTF-8.
The alert box has displayed : 233 116 233 NaN NaN

It seems strange to me.
Since my HTML page is encoded in UTF-8 and IE9 decodes my HTML page by using UTF-8, I expect the alert box displays : 195 169 116 196 116
0d195 0d169 0d116 0d196 0d116 is the UTF-8 decimal representation of the string “été”.
0xC3 0xA9 0x74 0xC3 0xA9 is the UTF-8 hexadecimal equivalent representation.

Does anyone could justify the content really displayed in the alert box ?

Test 2

For this test IE9 coding has been set to Occidental alphabet (ISO).
The alert box has displayed : 195 169 116 195 169

Again it seems strange to me.
I have got the result I expect for Test 1.

Does anyone could justify the content displayed in the alert box ?

  • 1 1 Answer
  • 0 Views
  • 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-06-01T02:24:06+00:00Added an answer on June 1, 2026 at 2:24 am

    The string "été" contains three characters, with the Unicode code numbers that your script displays. This does not depend on the character encoding. JavaScript code works on characters or, to put it more exactly, on Unicode code units, not on the bytes that were used to represent the character.

    If the actual encoding is UTF-8 and you make a browser treat it as being in some 8-bit encoding, which is what you probably mean by “Occidental alphabet (ISO),” then the browser misinterprets the octets of the UTF-8 representation as if each of them represented a characters

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

Sidebar

Related Questions

I have noticed that there are strange requests to my website trying to find
I have noticed that cURL in PHP returns different data when told to output
I have noticed that some apps like Safari and Mail show a loading indicator
I have noticed that regardless of a given script's execution time, every date() call
I have noticed that my particular instance of Trac is not running quickly and
I have noticed jQuery (or is it Firefox) will turn some of my <span
I have noticed in phpMyAdmin you can click 'optimise' on tables, and it runs:
I have noticed that my geocoder is inconsistent in the code shown below because
I have noticed over the years that different developers have different criteria for what
I have noticed that both IE6 and IE7 push the parent div down when

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.