[ic] Call for testers

Gert van der Spoel gert at 3edge.com
Mon Jun 22 09:31:19 UTC 2009


> -----Original Message-----
> From: interchange-users-bounces at icdevgroup.org [mailto:interchange-
> users-bounces at icdevgroup.org] On Behalf Of Gert van der Spoel
> Sent: Monday, June 22, 2009 10:49 AM
> To: interchange-users at icdevgroup.org
> Subject: Re: [ic] Call for testers
> 
> > -----Original Message-----
> > From: interchange-users-bounces at icdevgroup.org [mailto:interchange-
> > users-bounces at icdevgroup.org] On Behalf Of David Christensen
> > Sent: Monday, June 22, 2009 6:50 AM
> > To: interchange-users at icdevgroup.org
> > Subject: Re: [ic] Call for testers
> >
> > Gert,
> >
> > > diff --git a/lib/Vend/Table/Common.pm b/lib/Vend/Table/Common.pm
> > > index ee49e6a..b5375e8 100644
> > > --- a/lib/Vend/Table/Common.pm
> > > +++ b/lib/Vend/Table/Common.pm
> >
> > [snip]
> >
> > > @@ -165,7 +171,8 @@ sub unlock_table {  sub stuff {
> > >      my ($val) = @_;
> > >      $val =~ s,([\t\%]),$Hex_string[ord($1)],eg;
> > > -    return $val;
> > > +    my $retval = encode_utf8($val) if $::Variable->{MV_UTF8};
> > > +    return $retval;
> > >  }
> >
> > This hunk looks bunko to me, as $retval will be uninitialized unless
> > MV_UTF8 is set.
> 
> That's me, writing bunko code :) ... Less bunko patch attached.
> 
> What is more important to know is of course if this change is needed or
> if you suspect this to be a local issue on my end.
> 
> The error I get with a UTF8 encoded ctry_lang.txt  file:
> 10.0.0.152 3aFGGIv4:10.0.0.152 - [22/June/2009:09:21:45 +0200] acm
> /acm/test Runtime error: ctry_lang import into  failed: Wide character
> in null operation at /opt/interchange-utf8/lib/Vend/Table/Common.pm
> line 524, <IN> line 10.
> >
> 
> The file ctry_lang.txt looks like this:
> idx     country languages       ccode
> 6       United Kingdom  "English","en_UK"       UK
> 1       Belgie
> "Nederlands","nl_BE","Français","fr_BE","English","en_EU"      BE
> 5       Nederland       "Nederlands","nl_NL","English","en_EU"  NL
> 8       Other Country   "English","en_OC"       OC
> 4       France  "Français","fr_FR","English","en_EU"    FR
> 7       United States   "English","en_US"       US
> 9       Canada  "English","en_CA"       CA
> 2       Deutschland     "Deutsch","de_DE","English","en_EU"     DE
> 3       Ελλάδα  "Ελληνικά","gr_GR","English","en_EU"    GR
> 
> Line 10: 3       Ελλάδα  "Ελληνικά","gr_GR","English","en_EU"    GR
> 
> Removing line 10 using the unpatched version of Common.pm will result
> in NO crash, but the output on the browser is not correct for for
> example line 3 and 6: "Fran ais","fr_FR","English","en_EU"
> 
> When doing the file command: ctry_lang.txt: UTF-8 Unicode text
> 
> Removing lines 3, 6 and 10 will then give: ctry_lang.txt: ASCII text
> 
> So it does not die on lines 3 and 6 because the ç falls within the
> single byte character set.

OK ... I think for now you can scratch the patches for Vend/Table/Common.pm  and  
Vend/Table/GDBM.pm  .... I already had a difficult time explaining to myself the why/how/etc ...

I have now come to the conclusion that there is a difference between files such as locale.txt becoming a .gdbm file and other files such as the above ctry_lang.txt  file ... I think I had mentioned this a couple of months ago as well regarding the topic.

In the original, unpatched versions on David's tree (so the files that are in the repository), things are actually going fine for files such as ctry_lang.txt ... but not for locale.txt ... 

I will see if I can find where things are taking a wrong turn.

CU,

Gert















More information about the interchange-users mailing list