I'm having fits with some utf-8 stuff. This is probably due to the fact that I still haven't fully wrapped my head around the whole character encoding stuff. However here is my problem:

I have a cgi generating an html page with the following meta tag: <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">. This causes my browser (Mozilla 1.6) to set it's character coding to utf8, when I try to submit a form with a text box containing an 'ö' (o with umlauts)(via method 'POST') it is encoded as %C3%B6 the cgi has issues decoding this to the proper character. When I change the character encoding in my browser to ISO-8859-1 and send it, the character is translated into %F6. What is the easiest way to handle these unicode characters that have been URL encoded? I've tried looking at the CGI.pm's decoding and it doesn't seem to work properly, I'm at a loss as to where to go next. At least a shove in the right direction would be greatly appreciated.


In reply to UTF-8 and URL encoding by linux454

Title:
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, details, 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, summary, 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.