[ic] UTF-8 errors

Stefan Hornburg racke at linuxia.de
Fri Aug 21 09:08:52 UTC 2009


Andrew Rich wrote:
> Hi All
> 
> OS Centos 5
> v5.8.8 built for x86_64-linux-thread-multi
> 
> Installation of 5.7.1 wass originally nightly build but after git
> repository became available I used:
> 
> git clone git://git.icdevgroup.org/interchange
> 
> I was not sure of subsequent method of updating and have used:
> 
> git pull git://git.icdevgroup.org/interchange HEAD
> 
> Initially no problems but have just started getting following error
> messages on restart:
> 
> - - - [20/July/2009:11:17:55 +1000] - - Could not open error file : No
> such file or directory
>> to report this error: - - - [20/July/2009:11:17:55 +1000] - - Failed activating implicit UTF-8 in Safe container: Can't locate object method "SWASHGET" via package "Safe::Root0::utf8" (perhaps you forgot to load "Safe::Root0::utf8"?) at (eval 693) line 1, <CONFIG> line 548.
> - - - [20/July/2009:11:17:55 +1000] - - Could not open error file : No
> such file or directory
>> to report this error: - - - [20/July/2009:11:17:55 +1000] - - Failed compiling UTF-8 regular expressions in a Safe compartment with restricted opcode mask.  This may affect code in perl or calc blocks in your pages if you are processing UTF-8 strings in them.  Error: Can't locate object method "SWASHGET" via package "Safe::Root0::utf8" (perhaps you forgot to load "Safe::Root0::utf8"?) at (eval 695) line 1.
> 
> Following similar problem for Raymond I have used CPAN to install/update:
> Encode 2.35
> Safe 2.17
> 
> UTF-8 as far as I know has not been enabled on any catalogs.
> 

This patch fixes the issue with Perl 5.8.8:

diff --git a/lib/Vend/Safe.pm b/lib/Vend/Safe.pm
index bf143d2..bddfe35 100644
--- a/lib/Vend/Safe.pm
+++ b/lib/Vend/Safe.pm
@@ -57,8 +57,9 @@ sub initialize_safe_compartment {
     my $mask = $compartment->mask;
     $compartment->deny_only(); # permit everything
 
-    # add custom share variable for unicode support
+    # add custom shared variables for unicode support
     $compartment->share_from('main',['&utf8::SWASHNEW']);
+    $compartment->share_from('main',['&utf8::SWASHGET']);
 
     # preload utf-8 stuff in compartment
     $compartment->reval('qr{\x{0100}}i');

I don't know why this is necessary or why it seems to work,
I just second guesses it :-).

Regards
	Racke


-- 
LinuXia Systems => http://www.linuxia.de/
Expert Interchange Consulting and System Administration
ICDEVGROUP => http://www.icdevgroup.org/
Interchange Development Team




More information about the interchange-users mailing list