Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Why "Wide character in print"?

Received: by 10.66.81.200 with SMTP id c8mr8065430pay.1.1351330410314;
        Sat, 27 Oct 2012 02:33:30 -0700 (PDT)
Path: s9ni51498pbb.0!nntp.google.com!news.glorb.com!dotsrc.org!filter.dotsrc.org!news.dotsrc.org!not-for-mail
Newsgroups: comp.lang.perl.misc
From: Eric Pozharski <why...@pozharski.name>
Subject: Re: Why "Wide character in print"?
References: <48fb2f65-86d4-428b-b3ea-194f6cbf4d0c@googlegroups.com>
 <eli$1210241853@qz.little-neck.ny.us> <gujml9-rhc.ln1@anubis.morrow.me.uk>
 <eli$1210251546@qz.little-neck.ny.us> <vi7pl9-ui71.ln1@anubis.morrow.me.uk>
X-Comment-To: Ben Morrow
User-Agent: slrn/pre1.0.0-18 (Linux)
Mime-Version: 1.0
Message-ID: <slrnk8naco.e23.whynot@orphan.zombinet>
Date: Sat, 27 Oct 2012 12:30:00 +0300
Lines: 50
Organization: SunSITE.dk - Supporting Open source
NNTP-Posting-Host: 46.202.226.79
X-Trace: news.sunsite.dk DXC=j4lR4i8QRNFCbPFlQZmVYDYSB=nbEKnkKVf`nTIVCjSGh0T]WA7B;IJNH6]Of;n4k@NAlA<RLJPY@3T?AfIFTjZ@DAHCaDW_^CJ
X-Complaints-To: staff@sunsite.dk
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

with <vi7pl9-ui71....@anubis.morrow.me.uk> Ben Morrow wrote:

*SKIP*

> (In theory you can 'use encoding' to specify a different source
> character encoding, but in practice that pragma has always been buggy
> and is better avoided.)

Stop spreading FUD.  They need

	use encoding ENCNAME Filter => 1;

(what I<ENCNAME> could possibly be?) but

    *   "use utf8" is implicitly declared so you no longer have to "use
    	utf8" to "${"\x{4eba}"}++".

what pretty much defies the purpose of C<use encoding;>.

*SKIP*

> The lexer converts the "Ã¥" into a 1-character string which eventually
> gets passed to 'say', which appends a newline (that is, a character
> with ordinal 0a) and passes it to the STDOUT filehandle for writing. 

That's not a whole story.

	{2754:13} [0:0]% perl -Mutf8 -MDevel::Peek -wle '$aa = "а" ; Dump $aa'
	SV = PV(0x927a750) at 0x9295fac
	  REFCNT = 1
	  FLAGS = (POK,pPOK,UTF8)
	  PV = 0x9291a08 "\320\260"\0 [UTF8 "\x{430}"]
	  CUR = 2
	  LEN = 12
	{2936:14} [0:0]% perl -Mutf8 -MDevel::Peek -wle '$aa = "Ã¥" ; Dump $aa' 
	SV = PV(0x9af4750) at 0x9b0ffac
	  REFCNT = 1
	  FLAGS = (POK,pPOK,UTF8)
	  PV = 0x9b0ba08 "\303\245"\0 [UTF8 "\x{e5}"]
	  CUR = 2
	  LEN = 12

For a first glance, me wondered:  what the heck is with yours
C<use warnings;>.  Now I feel much better.

*CUT*

-- 
Torvalds' goal for Linux is very simple: World Domination
Stallman's goal for GNU is even simpler: Freedom