RTFM then.

huh? I asked what you meant.

LOL. It looks like Latin-1 and quacks like Latin-1, but it's not Latin-1. Yeah, it's just 'byte-packed subset of Unicode'.

huh? What are you talking about?

How about you 'fix' Perl's documentation, and then start arguing... It even talks about 'Unicode' and 'binary' strings (gasp).

You can start here. "Perl will assume that your binary string was encoded with ISO-8859-1" is indeed completely wrong. Concatenation does know or care what the string is.

$ perl -MEncode -E' $x = chr(0x2660); $y = encode($ARGV[0], chr(0xC9)); say sprintf "%vX.%vX %vX", $x, $y, $x.$y; ' iso-latin-1 2660.C9 2660.C9 $ perl -MEncode -E' $x = chr(0x2660); $y = encode($ARGV[0], chr(0xC9)); say sprintf "%vX.%vX %vX", $x, $y, $x.$y; ' UTF-8 2660.C3.89 2660.C3.89

Is that an error that perl -wE 'my $x = chr(0x00A9); say $x does one thing, and perl -wE 'my $y = chr(0x2660); say $y' does something else?

No, Perl "doing something else" (telling you you made an error) when you provide a bad input is not an error.

chr should be consistent,

huh? chr always returns a string consisting of the specified character.

So you're not even disagreeing. You just hate the word 'Latin-1'

huh? What are you talking about?!? No, I hate that you're saying your errors are errors in Perl. I hate that you are spreading misinformation about how Perl works. I hate that you're confusing people with issues that aren't even related to theirs. The OP's problem had nothing to do with internal storage formats.


In reply to Re^8: Database vs XML output representation of two-byte UTF-8 character by ikegami
in thread Database vs XML output representation of two-byte UTF-8 character by jkeenan1

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.