[svn:parrot] r48205 - trunk/config/gen

NotFound at svn.parrot.org NotFound at svn.parrot.org
Wed Jul 28 18:42:10 UTC 2010


Author: NotFound
Date: Wed Jul 28 18:42:09 2010
New Revision: 48205
URL: https://trac.parrot.org/parrot/changeset/48205

Log:
set binary charset when build directory contains non ascii chars, first step to TT #1717

Modified:
   trunk/config/gen/config_pm.pm

Modified: trunk/config/gen/config_pm.pm
==============================================================================
--- trunk/config/gen/config_pm.pm	Wed Jul 28 17:24:11 2010	(r48204)
+++ trunk/config/gen/config_pm.pm	Wed Jul 28 18:42:09 2010	(r48205)
@@ -1,4 +1,4 @@
-# Copyright (C) 2001-2009, Parrot Foundation.
+# Copyright (C) 2001-2010, Parrot Foundation.
 # $Id$
 
 =head1 NAME
@@ -69,6 +69,14 @@
     my $cwd = cwd();
     $cwd =~ s{ }{\\ }g;
 
+    # Build directory can have non ascii characters
+    # Maybe not the better fix, but allows keep working on the issue.
+    # See TT #1717
+    my $cwdcharset = q{};
+    if ($cwd =~ /[^[:ascii:]]/) {
+        $cwdcharset = 'binary:';
+    }
+
     my $pkg = __PACKAGE__;
     print {$OUT} <<"END";
 # ex: set ro:
@@ -138,7 +146,7 @@
                 }
             }
         }
-        elsif (s/\@PWD\@/$cwd/) {
+        elsif (s/\"\@PWD\@\"/$cwdcharset\"$cwd\"/) {
             print {$OUT} $_;
         }
         else {


More information about the parrot-commits mailing list