Sorry if this is off-topic, but I need some advice from people who have worked with UTF-8.

Do you know why Firefox (so far I have tested under Windows, Linux and MacOS X) does not show an Ö when I send the following data to the browser:

print $cgi->header(-charset => "utf-8"), "\x{4F}\x{CC}\x{88}";

Firefox shows an O followed by the dieresis instead of a "clean" O with dieresis. Other browsers such as IE (under MacOS and WinXP) and Safari handle this correctly.

Update

The sequence \x{4F}\x{CC}\x{88} represents the Unicode LATIN CAPITAL LETTER O followed by a DIAERESIS, which in theory should be displayed just like unicode LATIN CAPITAL LETTER O WITH DIAERESIS (\x{C3}\x{96}).

But I found that Firefox might have a bug displaying Unicode canonical equivalents.

Now, I have a less off-topic question: How can I convert the Unicode LATIN CAPITAL LETTER O followed by a DIAERESIS to LATIN CAPITAL LETTER O WITH DIAERESIS. Or in hexadecimal terms, how can I convert \x{4F}\x{CC}\x{88} to \x{C3}\x{96}?

I tried using all the normalization forms of Unicode::Normalizer, but no luck.


In reply to UTF-8 and browsers - Update by amonroy

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.