in reply to Re^2: The Queensrÿche Situation
in thread The Queensrÿche Situation

"Yes! That fixes the printing problem in my terminal!"

Thats nice. But just to add a little bit confusion., please see this:

A One-Liner prints it out as expected:

karl$ perl -e 'print qq(Queensrÿche\n)' Queensrÿche

But please see what happens when i put the stuff into a script (in the same terminal session):

#!/usr/bin/env perl use strict; use warnings; binmode STDOUT, ":utf8"; my $string = qq(Queensrÿche); print qq($string\n); my $y_with_trema = qq(\N{LATIN SMALL LETTER Y WITH DIAERESIS}); print qq($y_with_trema\n); $string = qq(Queensr) . $y_with_trema . qq(che); print qq($string\n); __END__ karls-mac-mini:monks karl$ ./roadster001.pl Queensrÿche ÿ Queensrÿche

Seems like things are getting weird. I wonder when i ever will understand this crap.

N.B.: I came in a bit late and didn't read all the posts yet.

Best regards, Karl

«The Crux of the Biscuit is the Apostrophe»

Replies are listed 'Best First'.
Re^4: The Queensrÿche Situation
by Rodster001 (Pilgrim) on Oct 19, 2014 at 21:38 UTC
    I can actually answer this now :) Take a look below, hopefully that will clear it up.
    #!/usr/bin/env perl use strict; use warnings; use Encode; binmode STDOUT, ":utf8"; my $string = qq(Queensrÿche); print qq($string\n); Encode::is_utf8($string)? print " - is utf8\n" : print " - is not utf8 +\n"; use utf8; $string = qq(Queensrÿche); no utf8; print qq($string\n); Encode::is_utf8($string)? print " - is utf8\n" : print " - is not utf8 +\n";
    Ouput:
    Queensrÿche - is not utf8 Queensrÿche - is utf8
      "...hopefully that will clear it up."

      Thank you Rodster001 for your reply.

      Unfortunately this doesn't explain why the One-Liner prints correctly.

      But perhaps i got yet another mental block ;-)

      Best regards, Karl

      «The Crux of the Biscuit is the Apostrophe»