[ic] Error while interpolating page etc/report: UTF-8 Issue

IC ic at tvcables.co.uk
Mon Jun 1 13:28:45 UTC 2009


> > > > Hi folks,
> > > >
> > > > I am running IC 5.6.0 with UTF-8, I get the following error message
> > > > which I
> > > > think is due to having the GBP £ symbol in the etc/report template,
> > the
> > > > error I get is:-
> > > >
> > > > Error during creation of order routing main:
> > > > Error while interpolating page etc/report:
> > > > Can't find Unicode property definition "Word" at
> > > > /usr/local/interchange/lib/Vend/Interpolate.pm line 3513.
> > > >
> > > > Does anyone know how I can display the £ symbol in the report
> > without
> > > > getting this error, as it is plain text I cannot use &pound or the
> > > > other
> > > > variants.
> > >
> > > And did you try without the £ symbol and then the error disappeared,
> > just
> > > to
> > > be sure it is related?
> > > Is the £ symbol properly converted to UTF-8?
> > >
> > >
> > > CU,
> > >
> > > Gert
> >
> > Hi Gert,
> >
> > On the main server I removed the £ symbols and didn't see the error
> > again,
> > however on a backup server running the same version of IC with UTF-8
> > the
> > same report template with the £ symbol didn't generate the error. I did
> > however get an error on this server from etc/mail_receipt which again
> > seems
> > to be £ symbol related.
> 
> Odd that on your backup server you do not experience the same, but your
> installation is?
> Or is there a slight difference (for example a space between the pound
> sign
> and the [filter] tag, etc).
> 
> 
> Somewhere in Vend/Order.pm you find:
>                eval {
>                         $page = interpolate_html($page) if $page;
>                 };
>                 if ($@) {
>                         die "Error while interpolating page $pagefile:\n
> $@";
>                 }
> 
> Perhaps you could see what goes into '$page' on your backup server for
> each
> situation to establish more precisely where it goes wrong ...
> 
> As far as I can see the line where the error happens in Interpolate.pm is:
> 
> #       LdExpr=$LdExpr
> #EOF
> 
>     while($$text =~ $LdExpr) {      <-- this line
>                 $table = $2;
> 
> 
> I'm not totally sure though if that is the same version as yours.
> This would be in sub tag_labeled_data_row {  ...
> 
> I have not been able to reproduce your issue in my local test version,
> alas.
> 
> CU,
> 
> Gert

I logged the $page variable in order.pm and it looks identical to the
template, log entry pasted below, as you can see at the bottom it failed to
interpolate, if I delete the £ signs it interpolates ok.

Andy.

[if value payment_method eq credit][set payment]Credit Card[/set]
[elsif value payment_method eq check][set payment]Online Check[/set][/elsif]
[elsif value payment_method eq po][set payment]Company P.O.[/set][/elsif]
[elsif value payment_method eq postal][set payment]Postal
Billing[/set][/elsif]
[/if]
[seti order_text]
-     ORDER DATE: [tag time]%c[/tag]
      SHOPPER IP: [data session ohost]
    ORDER NUMBER: [value mv_order_number]
     LEAD SOURCE: [data session source]
   REFERRING URL: [data session referer]
        DISCOUNT: [value discount_code] [scratch discount_result]

            Name: [value fname] [value lname]
[if value company]         Company: [value company][/if]
   Email address: [value email][if value email_copy] - EMAIL COPY
REQUESTED[/if]
   Mail List Req: [value mail_list]

         Address: [value address1][if value address2]
                  [value address2][/if]
City, State, Zip: [value city], [value state]  [value zip]
         Country: [value country]
[if value mv_credit_card_info]
Credit Card Info:
[value mv_credit_card_info]
[else]
[/else][/if]
  Payment Method: [value mv_payment]

[if value payment_method eq credit]  Account Number: [value
mv_credit_card_reference]      Expiration: [value
mv_credit_card_exp_month]/[value mv_credit_card_exp_year][/if]
[if value payment_method eq check]  Account Number: [value check_acct]
Routing Number: [value check_route]    Check Number: [value check_num][/if]
[if value payment_method eq po]  Company Name: [value po_company]  P.O.
Number: [value po_number][/if]

 Shipping Method: [shipping-desc][if value mv_handling]
 Handling Charge: [loop list="[value mv_handling]"][shipping_desc
mode="[loop-code]"] [/loop][/if]

   Daytime Phone: [value phone_day]
   Evening Phone: [value phone_night]
[if value b_fname]
[or value b_address1]
    Billing Name: [value b_fname] [value b_lname]
 Billing Address: [value b_address1][if value b_address2]
                  [value b_address2][/if]
City, State, Zip: [value b_city], [value b_state]  [value b_zip][/if]
[if value b_country] Billing Country: [value b_country]
[/if]

Quan  Item No.    Description                            Price
Extension
---- ----------- -------------------------------- -------------
---------------
[item-list][row 82]
[column width=5             gutter=1 align=right]  [item-quantity] [/column]
[column width=12            gutter=1]  [item-sku] [/column]
[column width=32 align=left gutter=1 wrap=1]
[item-data products description]
[/column]

[column width=14 align=right gutter=1]£[filter op="sprintf %.2f"
interpolate=1][item-price noformat=1][/filter][/column]
[column width=15 align=right gutter=0]£[filter op="sprintf %.2f"
interpolate=1][item-subtotal noformat=1][/filter][/column]
[/row]
[if-item-data options o_enable][if-item-data !options o_modular][row 82]
    [column width=5 gutter=1 align=right][/column]
    [column width=12 gutter=1] [item-code] [/column]
    [column width=32 wrap=1 gutter=1][filter op="tabbed decode_entities
compress_space strip"][item-options report=1][/filter][/column]
[/row][/if-item-data][/if-item-data]
[if-item-modifier mv_ad]
[row 82]
[column width=5             gutter=1 align=right] [/column]
[column width=12            gutter=1] SHIP TO: [/column]
[column width=61 align=n][item-modifier mv_ad][/column]
[/row]
[/if-item-modifier]

[/item-list]
[row 82]
[column width=5  align=right gutter=1][/column]
[column width=12             gutter=1][/column]
[column width=32 align=right gutter=1 wrap=1][/column]
[column width=14             gutter=1]SUBTOTAL[/column]
[column width=15 align=right gutter=0]£[filter op="sprintf %.2f"
interpolate=1][subtotal noformat=1][/filter][/column]
[/row]
[row 82]
        [column width=5  align=right gutter=1][/column]
        [column width=12             gutter=1][/column]
        [column width=32 align=right gutter=1 wrap=1][/column]
        [column width=14             gutter=1]SHIPPING[/column]
        [column width=15 align=right gutter=0]£[filter op="sprintf %.2f"
interpolate=1][shipping noformat=1][/filter][/column]
[/row][if value mv_handling]
[row 82]
        [column width=5  align=right gutter=1][/column]
        [column width=12             gutter=1][/column]
        [column width=32 align=right gutter=1 wrap=1][/column]
        [column width=14             gutter=1]HANDLING[/column]
        [column width=15 align=right gutter=0]£[filter op="sprintf %.2f"
interpolate=1][handling noformat=1][/filter][/column]
[/row]
[row 82]
[column width=5  align=right gutter=1][/column]
[column width=12             gutter=1][/column]
[column width=32 align=right gutter=1 wrap=1][/column]
[column width=14             gutter=1]VAT[/column]
[column width=15 align=right gutter=0]£[filter op="sprintf %.2f"
interpolate=1][salestax noformat=1][/filter][/column]
[/row]
[/if]
[row 82]
[column width=5  align=right gutter=1][/column]
[column width=12             gutter=1][/column]
[column width=32 align=right gutter=1 wrap=1][/column]
[column width=14             gutter=1]ORDER TOTAL[/column]
[column width=15 align=right gutter=0]£[filter op="sprintf %.2f"
interpolate=1][total-cost noformat=1][/filter][/column]
[/row]

[if value gift_note]
Gift Note or Special Instructions:
---------------------------------------------------
[value gift_note]
[/if]
[/seti]
[tag op=mime description="Order Text" interpolate=1]
[scratch order_text]
[/tag]
[if value mv_credit_card_info]
[tag    op=mime
                interpolate=1
                type=application/pgp-encrypted
                description="CreditCard_[value mv_order_number]"]
[value mv_credit_card_info]
[/tag]
[/if]

ERRORS on ORDER 96068:
Error during creation of order routing main:
Error while interpolating page etc/report:
 Can't find Unicode property definition "Word" at
/usr/local/interchange/lib/Vend/Interpolate.pm line 3513.




More information about the interchange-users mailing list