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 6174415
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T23:44:58+00:00 2026-05-23T23:44:58+00:00

<head> <meta charset=ISO-8859-7> </head> I’ve been working with forms and see that the <meta

  • 0
<head>
<meta charset="ISO-8859-7">
</head>

I’ve been working with forms and see that the <meta charset="ISO-8859-7"> tag encode the text that will be typed within a text area. Thing that the encoding method used to store the file isn’t does.

I’ve saw that if a character typed isn’t part of the encoding speciefied by the <meta charset="ISO-8859-7"> tag, the character will be referenced (&#D;)

I was supposing that the form was sending bytes sequences from the encoding speciefied.
Cuz if i type a character whatever it is, will be a byte that an encoding will interpret.

For example with the <meta charset="ISO-8859-7">
i type in a form the character "¥"

This char isn’t part of the encoding but it must send as a byte of the position that it represents A5, no matter if it can be represented (This is maked normally by any editor).

But not, the form don’t send it as a byte, rather the character is referenced.

Code:

index.php:

<?php header('Content-Type: text/html; charset=ISO-8859-7'); ?>

<head>
    <meta charset="ISO-8859-7">
</head>
<form method="post" action="encode.php" accept-charset="ISO-8859-7">
    <p><textarea name="input" maxlength="10" rows="5" cols="100"></textarea></p>
    <p><button>Submit</button></p>
</form>

encode.php:

<head>
    <meta charset="ISO-8859-7"><!-- Useless, Even if is specified the ISO-8859-1 where the "¥" exist, the form sended a reference char rather an a byte to interpret.-->
</head>
<?php
    $input=$_POST["input"];
    var_dump($input);
?>

Result in Sourcecode:

string(6) "&#165;"

Note: I’ve tested changing the Encoding used to store the file.

in the index.php:
Doesn’t matter what encoding is used to store the file, the form always will send accordingly with the accept-charset="" attribute or with the <meta charset=""> tag if the accept-charset="" is not specified.

And with the encode.php:
The string is never encoded by the file. Can be worked and represented, but the encoding used to store the file has nothing to do with that.

  • 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-05-23T23:44:58+00:00Added an answer on May 23, 2026 at 11:44 pm

    The problem is that the typed character is not supported by the form encoding.

    As far as I can see, neither HTML 4 nor HTML 5 specifies what the browser should do, if the user enters a character in a form field that is not supported by the form encoding.

    HTML 5 does specify that unsupported characters should be replaced by an ASCII ? in the query part of URLs¹ (and thus in GET form submissions?), but I can’t find anything for POST forms.

    It seems that all the browsers (or at least IE, FF, Chrome, Opera) have agreed on encoding unsupported characters as an XML entity. (A better approach would probably have been to warn the user and prevent form submission, but that’s water under the bridge.)

    The solution is, of course, to use UTF-8 all the way. Then all characters are supported by the encoding, and this problem doesn’t arise.


    ¹ 2.6.3 Resolving URLs. HTML 5, W3C Working Draft 25 May 2011, item 8.1:

    If the character in question cannot be expressed in the encoding encoding, then replace it with a single 0x3F octet (an ASCII question mark) […]

    Fun fact: The above only applies to the query part (the part after the question mark) of the IRI. The path portion is always encoded using UTF-8. And the host name is of course encoded using Punycode. The mind boggles.

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

Sidebar

Related Questions

<head> <title>Overlay test</title> <meta http-equiv=Content-Type content=text/html; charset=iso-8859-1 /> <style type=text/css> #overlay { position: absolute;
Here is my index.jsp code: <html> <head> <meta http-equiv=Content-Type content=text/html; charset=ISO-8859-1> <title>Index JSP File</title>
Ok, I've got this code: <html> <head> <meta http-equiv=Content-Type content=text/html; charset=iso-8859-1> <script type=text/javascript href=https://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js></script>
i have script like this.... <head> <meta http-equiv=content-type content=text/html; charset=iso-8859-1 /> <meta name=author content=bbbbb
Given the following HTML: <!DOCTYPE html> <html lang='en'> <head> <meta charset='iso-8859-1' /> <title>Test</title> <style>
98.214.131.200/index.php <html> <head> <title>Peoria Triathlon Club</title> <meta charset=iso-8859-1 /> <link href=style.css rel=stylesheet type=text/css />
My code is : //cron.html <head> <meta http-equiv=Content-Type content=text/html; charset=windows-1252> <meta name=ProgId content=Word.Document> <meta
look at this code, <head> <meta http-equiv=Content-Type content=text/html; charset=utf-8 /> <script> function change() {
<!DOCTYPE html> <html> <head> <meta http-equiv=Content-Type content=text/html; charset=utf-8/> <title>FAQ Section</title> <link rel=stylesheet type=text/css href=styles.css/>
test.php - Using regular IDE(phpDesigner7) <head> <meta http-equiv=content-type content=text/html; charset=iso-8859-1 /> </head> <body> <?php

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.