Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

comment on

( [id://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

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



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (3)
As of 2024-03-29 07:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found