Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
only check for ICU on parrot in Str.perl
  • Loading branch information
FROGGS committed Apr 21, 2014
1 parent 4332d7e commit 3425f2b
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/core/Str.pm
Expand Up @@ -536,13 +536,22 @@ my class Str does Stringy { # declared in BOOTSTRAP
multi method gist(Str:D:) { self }
multi method perl(Str:D:) {
my $result = '"';
#?if parrot
my $icu = $*VM<config><has_icu>;
for ^self.chars -> $i {
my $ch = self.substr($i, 1);
$result ~= %esc{$ch}
// ( ((!$icu && $ch.ord >= 256)
|| nqp::iscclass( nqp::const::CCLASS_PRINTING,
nqp::unbox_s($ch), 0))
#?endif
#?if !parrot
for ^self.chars -> $i {
my $ch = self.substr($i, 1);
$result ~= %esc{$ch}
// (nqp::iscclass( nqp::const::CCLASS_PRINTING,
nqp::unbox_s($ch), 0)
#?endif
?? $ch
!! $ch.ord.fmt('\x[%x]')
);
Expand Down

0 comments on commit 3425f2b

Please sign in to comment.