[interchange] Consistently use same 'utf8' character set encoding to avoid Safe problems
Stefan Hornburg (Racke)
racke at linuxia.de
Sat Sep 17 10:23:11 UTC 2016
On 09/17/2016 12:30 AM, Jon Jensen wrote:
> commit e81794d14ff593c55e5a5b7cccb2d7bf2c135897
> Author: Jon Jensen <jon at endpoint.com>
> Date: Fri Sep 16 16:28:00 2016 -0600
>
> Consistently use same 'utf8' character set encoding to avoid Safe problems
>
> Using the alternate 'utf-8' encoding name means Encode tries to pull in
> Encode::Alias but fails inside Safe containers without allowing an absurd
> number of exceptions via SafeUntrap.
>
Good catch, Jon! I definitely encountered this problem and had no idea why this
happened.
Thanks
Racke
> lib/Vend/Table/GDBM.pm | 10 ++++------
> 1 files changed, 4 insertions(+), 6 deletions(-)
> ---
> diff --git a/lib/Vend/Table/GDBM.pm b/lib/Vend/Table/GDBM.pm
> index fb82dbb..55a4610 100644
> --- a/lib/Vend/Table/GDBM.pm
> +++ b/lib/Vend/Table/GDBM.pm
> @@ -1,8 +1,6 @@
> # Vend::Table::GDBM - Access an Interchange table stored in a GDBM file
> #
> -# $Id: GDBM.pm,v 2.20 2009-03-22 19:32:31 mheins Exp $
> -#
> -# Copyright (C) 2002-2008 Interchange Development Group
> +# Copyright (C) 2002-2016 Interchange Development Group
> # Copyright (C) 1996-2002 Red Hat, Inc.
> #
> # This program was originally based on Vend 0.2 and 0.3
> @@ -39,7 +37,7 @@ else {
> }
>
> @ISA = qw(Vend::Table::Common);
> -$VERSION = substr(q$Revision: 2.20 $, 10);
> +$VERSION = '2.21';
>
> sub new {
> my ($class, $obj) = @_;
> @@ -147,8 +145,8 @@ sub apply_utf8_filters {
>
> #::logDebug("applying UTF-8 filters to GDBM handle");
>
> - my $out_filter = sub { $_ = encode('utf-8', $_) };
> - my $in_filter = sub { $_ = decode('utf-8', $_) };
> + my $out_filter = sub { $_ = encode('utf8', $_) };
> + my $in_filter = sub { $_ = decode('utf8', $_) };
>
> $handle->filter_store_key($out_filter);
> $handle->filter_store_value($out_filter);
>
> _______________________________________________
> interchange-cvs mailing list
> interchange-cvs at icdevgroup.org
> http://www.icdevgroup.org/mailman/listinfo/interchange-cvs
>
--
Ecommerce and Linux consulting + Perl and web application programming.
Debian and Sympa administration.
More information about the interchange-cvs
mailing list