On Tue, 7 Mar 2017 00:23:38 -0800, ToddAndMargo <toddandma...@zoho.com>
wrote:

> >>> 002b93        NEWLINE RIGHT
> >>> 003037        IDEOGRAPHIC TELEGRAPH LINE FEED SEPARATOR SYMBOL
> >>> 004dd7        HEXAGRAM FOR RETURN  
> >>
> >> Do these have "\x" escape characters like "\n"?  
> >
> > perl5 -wE'say "\x{2028}"'
> > perl6  -e'say "\x[23ce]"'  
> 
> Great example.  Thank you!

yw.

Note however that perl6 is pure-utf8 by default, and perl5 is not,
which is why my example will warn in perl5:

$ perl5 -wE'say "\x{23ce}"'
Wide character in say at -e line 1.
⏎

In perl5 you'll need several hoops to jump through to ensure your data
is valid both on input and output

$ perl5 -CO -wE'say "\x{23ce}"'
⏎

$ perl5 -wE'binmode STDOUT, ":encoding(utf-8)"; say "\x{23ce}"'
⏎

That means that if your IO contains non-utf8, like JPG images, you'll
need that extra stretch in perl6. As working with text is more common
than working with images (raw binary data), I think poerl6 made the
best options default.

-- 
H.Merijn Brand  http://tux.nl   Perl Monger  http://amsterdam.pm.org/
using perl5.00307 .. 5.25   porting perl5 on HP-UX, AIX, and openSUSE
http://mirrors.develooper.com/hpux/        http://www.test-smoke.org/
http://qa.perl.org   http://www.goldmark.org/jeff/stupid-disclaimers/

Attachment: pgp2r70CFCzQH.pgp
Description: OpenPGP digital signature

Reply via email to