Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??

It's also helpful to include accept-charset="utf-8" inside the form tag in any forms on any HTML pages you've created. That way, if your server were to be configured to send "Content-Type: text/html; charset=ISO-8859-1" in the httpd response header of the HTML page containing the form (accidentally, or for whatever other reason, such as its being the default for Apache), the text entered by the user into the form nevertheless would be encoded by the user's browser as UTF-8 when it's submitted. Without an accept-charset attribute inside the form tag, the browser in that scenario would encode the text using whatever encoding is specified in the httpd response header sent by Apache or other web server that serves up the HTML page.

Also, if the HTML page with the form has a meta tag that specifies a character set other than UTF-8, such as <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> or <meta charset=ISO-8859-1>, having accept-charset="utf-8" inside the form tag would cause the browser to use UTF-8 encoding for the submitted text. (It's true that most browsers ignore such meta tags when a web server already has sent charset=UTF-8 in the header, but a copy of the web page might have been saved to the user's computer and thereafter used to submit text in a form, in which case there would be no headers from a server to prevent the meta tags from controlling the page's character set and corresponding encoding of submitted text.)

In reply to Re: Converting everything (MySql, perl, CGI, website) to UTF-8 by davebaker
in thread Converting everything (MySql, perl, CGI, website) to UTF-8 by jfrm

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":

  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?

    What's my password?
    Create A New User
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others pondering the Monastery: (5)
    As of 2021-01-22 11:08 GMT
    Find Nodes?
      Voting Booth?