I pasted that two-character sequence from the OP into a file…
cat > /tmp/junk.txt μ ^D
With the line-feed added at the end, the file was 5 bytes -- just what I would expect for those two characters, given that they are encoded in utf8 (two bytes per character).

If I use any given character-encoding conversion process on that file, and convert from utf8 to iso-8859-1 (or cp1252, which is roughly equivalent), I get the expected 3-byte result:

0xCE 0xBC 0x0A # now 1-byte/char, the line-feed is unchanged
If you look up those two byte values in a Latin-1 table, you'll see that they are the "Latin capital letter I with circumflex" and the "vulgar fraction one quarter"; but when that two-byte sequence is interpreted as a utf8 character, it turns out to be U+03BC, "Greek small letter mu".

In reply to Re: Matching/replacing a unicode character only works after decode() by graff
in thread Matching/replacing a unicode character only works after decode() by FloydATC

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.