New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
building rakudo fails with PERL_UNICODE=SAL #1989
Comments
From perl@cjmweb.netI tried to build Rakudo Star 2010.07, but it failed with src/gen/core.pm > src/gen/core.pir I'm running 32-bit Gentoo Linux with Perl 5.10.1. I investigated and found that the offending line in src/gen/core.pm @named-params».name».substr(1) But the original line in src/core/MAIN.pm contained @named-params».name».substr(1) "»" in UTF-8 is C2 BB, which in ISO-8859-1 is "»". So it appears that MAIN.pm is being read as if it were ISO-8859-1 and I had PERL_UNICODE set to SAL, and that causes the build to fail Steps to reproduce: Unpack rakudo-star-2010.07.tar.gz -- |
From perl@cjmweb.netI forgot to mention that my LANG=en_US.utf8, and no LC_* vars are set. |
perl@cjmweb.net - Status changed from 'new' to 'open' |
perl@cjmweb.net - Status changed from 'open' to 'new' |
From perl@cjmweb.netbuild/gen_core_pm.pl is opening files using open(my $fh, "<", but writing to STDOUT. My PERL_UNICODE setting causes STDOUT to be gen_core_pm.pl (and similar scripts) need to either binmode STDOUT, or |
From perl@cjmweb.netThe attached patch (from |
From perl@cjmweb.net0001-Explicitly-request-utf8-layer-in-gen_core_pm.pl-to-f.patchFrom 450fccceb8a3963202f6f5783f83b56449dcc219 Mon Sep 17 00:00:00 2001
From: Christopher J. Madsen <perl@cjmweb.net>
Date: Sat, 31 Jul 2010 10:49:19 -0500
Subject: [PATCH] Explicitly request :utf8 layer in gen_core_pm.pl to fix RT #76856
---
build/gen_core_pm.pl | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/build/gen_core_pm.pl b/build/gen_core_pm.pl
index 10208ad..ce4198e 100644
--- a/build/gen_core_pm.pl
+++ b/build/gen_core_pm.pl
@@ -4,6 +4,9 @@
use strict;
use warnings;
+use 5.008;
+
+binmode STDOUT, ':utf8';
my @files = @ARGV;
@@ -15,7 +18,7 @@ END_SETTING
my %classnames;
foreach my $file (@files) {
print "# From $file\n\n";
- open(my $fh, "<", $file) or die $!;
+ open(my $fh, "<:utf8", $file) or die "$file: $!";
local $/;
my $x = <$fh>;
close $fh;
--
1.6.4.4
|
From @moritzOn Sat Jul 31 08:56:19 2010, cjm wrote:
http://github.com/madsen/rakudo/commit/450fccceb8a3963202f6f5783f83b56449dcc219
Thank you very much, applied. Cheers, |
The RT System itself - Status changed from 'new' to 'open' |
@moritz - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#76856 (status was 'resolved')
Searchable as RT76856$
The text was updated successfully, but these errors were encountered: