in reply to Re^5: Interventionist Unicode Behaviors
in thread Interventionist Unicode Behaviors

Are you implying that I broke that code accidentally? ;)
Why would you break anything on purpose, and not mention that you did? That's a terrible waste of other people's time.

Juerd, I'm trying to keep things friendly, here. It's my style to fight fire with water. Hence the smiley and the oblique remark as a response to some rather nasty comments, even though something stronger might have been warranted.

The code in the OP is "broken" in the sense that it triggers a warning. That was intentional. It's broken -- on purpose -- because the whole point of that snippet is to trigger the warning.

You would also argue that it is broken because of the way that I constructed the example scalars. For me, how those scalars were constructed is a peripheral issue. For you that issue appears to be central. My code works fine as it is, and so I disagree: it is not "broken" in the way you assert. Nevertheless, in the future, I will adopt the pack technique you advocate for constructing binary strings, and I thank you and demerphq for bringing it to my attention.

In the meantime, I would appreciate it if we could lower the temperature of this discussion. Nobody's perfect. You are obviously quite knowledgeable about Unicode and Perl (as I knew when I cited your tutorial), yet you have said things in this thread which are demonstrably wrong[1], and in the very post where you scold me for not knowing what the heck my broken code does. We're all here to learn, and I'm grateful for your more thoughtful posts. Hopefully we can continue to learn from each other in the future.

[1] "No, we see the warning because you're printing something that has the UTF8 flag set (and thus with certainty is a text string), to a filehandle that doesn't have an encoding attached to it." If that were true, then this code would issue a warning:

#!/usr/bin/perl use strict; use warnings; use Devel::Peek; use charnames ':full'; my $thorn = "\N{LATIN CAPITAL LETTER THORN}"; Dump $thorn; print $thorn; print "\n";
--
Marvin Humphrey
Rectangular Research ― http://www.rectangular.com

Replies are listed 'Best First'.
Re^7: Interventionist Unicode Behaviors
by Juerd (Abbot) on Sep 11, 2006 at 22:15 UTC

    Obviously I'm missing the point of your OP. Could you rephrase your actual question? You ask for a rationale behind something, but with all this new information about how you did and didn't intend it, I find it hard to believe that you want to know why you get a warning. After all, you're perfectly aware that you've broken things on purpose, just to get that warning. Please help me understand your question (i.e. which rationale), and how your code snippet relates to that.

    Other replies in this thread have been very similar to what I have replied, so I can't be the only one who has not managed to parse your OP right.

    Juerd # { site => 'juerd.nl', do_not_use => 'spamtrap', perl6_server => 'feather' }